Results 1 to 7 of 7

Thread: Slight problem thats bugging the he** outta me.

  1. #1
    Join Date
    Aug 2005
    Posts
    115
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default Slight problem thats bugging the he** outta me.

    HTML File: http://www.geocities.com/spinethetic3/ibiyb/index.htm
    Relevant CSS file: http://www.geocities.com/spinethetic...les/styles.css

    I am having what would, I would think, be a simple sizing problem for the main cont DIV.
    .main {
    margin: 0px;
    padding: 8px 10px 10px 12px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    color: #333333;
    text-align: left;
    background-color: #FAFFFF;
    background-repeat: no-repeat;
    vertical-align: top;
    height: 100%;
    width: 560px;
    }
    As can be seen in the HTML page ".main" content extends about 10 pixels wider than I want it because I want it to line up even with the header/nav and the footer. But simply changing the 'width' rule isnt working! This is probably just some simple little problem that I am overlooking isnt it?

  2. #2
    Join Date
    Dec 2005
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    If I remember correctly, IE treats the CSS box model differently than gecko based browsers such as Firefox and Netscape and adds the padding inside the dimensions rather than adding it outside. Try removing the padding to see if that solves the problem. If so use margins or relative positioning to move the main div away from other elements

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    You can use the following hack to cause the padding not to be applied in IE:
    Code:
    padding: 8px 10px 10px 12px !important;
    padding: 0;
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Aug 2005
    Posts
    115
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default

    Quote Originally Posted by Twey
    You can use the following hack to cause the padding not to be applied in IE:
    Code:
    padding: 8px 10px 10px 12px !important;
    padding: 0;
    Thatsnot working for me, it still looks the same:

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    In that case, it isn't the padding that's the problem.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #6
    Join Date
    Dec 2005
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Have you looked at your page at a resolution greater than 800x600? There's more than a little gap, the header is way off. Try wrapping a container div around all your content and this to your CSS:
    Code:
    body {
    margin: 0;
    padding: 0;
    text-align: center;
    }
    #container {
    margin: auto;
    width: ??%; /* insert value to replace ?? */
    text-align: left;
    }
    That should hold everything and center it on the page regardless of resolution. Then remove any width declarations from elements that you want extending across the page. They will default to 100% of the container div. If there is an element that still doesn't stretch to fill the container div then look for values in margins/padding that is preventing it. You can temporarily add border: 1px solid #f00; to elements to highlight them and see exactly where they are sitting. You may have to go through each element to isolate the problem. On a side note: using % instead of absolute values will give your design more flexibility at different resolutions.

  7. #7
    Join Date
    Aug 2005
    Posts
    115
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default

    I think its completely fixed now.

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
  •