Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Firefox2 compatibility - centering a table

Firefox2 compatibility - centering a table

Scheduled Pinned Locked Moved ASP.NET
questionvisual-studiosysadmintutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    boy pockets
    wrote on last edited by
    #1

    Hi all, I am having browser compatiabiltiy problems. I want to center a table (or a Login Control). It works fine in IE(7), but not in FF(2). Here is an example where is will center align in IE, but left align in FF:

    <div style="text-align:center;">
    <asp:Login ID="login" runat="server" ... />
    </asp:Login>
    </div>

    The same thing will happen if I replace the Login with a Table Control. I have tried adding the property align="center" to the div (as suggested on other forums), but this tag is not recognised by VS 2005, so no joy. So how do i get such a control to center in FF?

    B 1 Reply Last reply
    0
    • B boy pockets

      Hi all, I am having browser compatiabiltiy problems. I want to center a table (or a Login Control). It works fine in IE(7), but not in FF(2). Here is an example where is will center align in IE, but left align in FF:

      <div style="text-align:center;">
      <asp:Login ID="login" runat="server" ... />
      </asp:Login>
      </div>

      The same thing will happen if I replace the Login with a Table Control. I have tried adding the property align="center" to the div (as suggested on other forums), but this tag is not recognised by VS 2005, so no joy. So how do i get such a control to center in FF?

      B Offline
      B Offline
      Bardy85
      wrote on last edited by
      #2

      Sometimes align="CENTER" is not picked up in VS 2005, just put it in and run the project and see if it works. Or try and change the target schema for validation. It should be sitting in your toolbar at the top of your screen if not right click and select HTML source editing. Hope this helps

      B 1 Reply Last reply
      0
      • B Bardy85

        Sometimes align="CENTER" is not picked up in VS 2005, just put it in and run the project and see if it works. Or try and change the target schema for validation. It should be sitting in your toolbar at the top of your screen if not right click and select HTML source editing. Hope this helps

        B Offline
        B Offline
        boy pockets
        wrote on last edited by
        #3

        As it turns out, I did not need the align="center". This is what I used:

        ....

        I got this answer from http://forums.asp.net/t/1280636.aspx

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups