The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS IE6, 100% Width & Centering

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #28759

    On most of my sites I use a css class like this:

    .center {
    width: 100%;
    text-align: center;

    Which I use to center any text on the site that needs to be centered. The problem is that IE6 is throwing me a strange problem. The text centers, but it is like the width is only set to 50%. This results in really ugly centered text. I can’t figure out a solution, any suggestions? Why might this be happening, it doesn’t make sense to me.


    Maybe I’m not thinking this through enough… but why bother with the 100% width?


    Sorry, I should have mentioned that I am applying this to block elements (div, h1, etc). If width: 100%; is not set that it has no effect since the element is only as wide as the text itself.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.