css problem

Out of context: Reply #3

  • Started
  • Last post
  • 7 Responses
  • flashbender0

    most typically this can occur when a float is not cleared.

    Put a <br style="clear:both" /> and see if that fixes it.

    one big issue is that you have the same ID for all of your projects:
    div id="projects1"

    you can easily fix this by making that a class instead of an ID selector.

    Also, instead of padding-top, padding-bottom... you can just use:

    padding:10px 25px 10px 25px.

    the order of that is top right bottom left. this is true of border as well.

    I would also recommend rewriting using actual HTML tags instead of custom classes e.g. use an H1 tag instead of "textheader". This not only makes your pages more accessible, but it also makes them more SEO friendly. For more info on this look up semantic markup.

    a couple links that deal with IE quirks and CSS positioning:
    http://www.positioniseverything.…
    http://www.barelyfitz.com/screen…

    regarding design for old browsers - it depends on your target audience and how much time and effort you wish to spend developing the site... but you can't ignore that IE 6&7 together still account for more than 20% of browsers according to W3C.

    also, your code looks overly complicated for what you are trying to do.

View thread