SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot LunaC's Avatar
    Join Date
    Feb 2001
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    DIV padding problem

    I'm trying to make my new site work well in all broswers (yeah, I know, it's near to impossible ) but I can't for the life of me get the div tags to display the same width.

    So far with my searching I've found out it's because IE includes border & padding inside the mesurements, while others add it to the outside...

    Is there a solution to make it look the same for everyone?

    I have images on top of the div (can't put them inside because I don't want the border outside the image) so it looks off for everyone not using IE.

    It's a small problem, but it's been driving me nuts for an hour or so.

  2. #2
    SitePoint Wizard
    Join Date
    Jan 2001
    Location
    Milton Keynes, UK
    Posts
    1,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try the following link LunaC. It explains how to get around the differences between IE, N6 and Opera. It's also got the ugly hack thats needed for IE6. The other way you could do it is to use a browser sniffer, either client- or server- side, and serve up a different stylesheet for different browsers.

    http://www.glish.com/css/hacks.asp


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •