If #maincontent has no content, layout shifts left..

Discussion in 'CSS' started by deronsizemore, Aug 9, 2006.

  1. #1
    www.kentuckygolfing.com

    I've run into a very small issue with my site. I noticed that when I take away the content in #maincontent, the right two columns shift left, and it seems to be happening only in FireFox, as IE looks fine. As you can see the background image I have repeating (two 1px gray lines), that is my basic layout, where the #maincontent div is on the left. Search input, Recent posts, etc... in the middle, and then the navigation is suppose to be on the right of the two gray lines, but since there is not content in the #maincontent div, everything has shifted left. Although I can't imagine not ever having any content in that #maincontent section, it could arise later, and I'd like to fix this, but I don't see anything that would be causing this.

    Anyone got thoughts on this?
     
    deronsizemore, Aug 9, 2006 IP
  2. mattmdesign

    mattmdesign Well-Known Member

    Messages:
    1,201
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    118
    #2
    Did you try it with just a   in the div?
     
    mattmdesign, Aug 9, 2006 IP
  3. deronsizemore

    deronsizemore Peon

    Messages:
    103
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes, that   works, but I still figured there must be something wrong with my code somewhere, else it wouldn't be doing that, right? Maybe it's just me wanting to be to perfect.
     
    deronsizemore, Aug 9, 2006 IP
  4. mattmdesign

    mattmdesign Well-Known Member

    Messages:
    1,201
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    118
    #4
    My layouts always mess up if there is absolutely nothing in a div or td.
     
    mattmdesign, Aug 9, 2006 IP