Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6369693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:50:15+00:00 2026-05-25T00:50:15+00:00

Ok, I have the following layout/CSS: div#wrap { margin-left: auto; margin-right: auto; position: relative;

  • 0

Ok, I have the following layout/CSS:

div#wrap {
    margin-left: auto;
    margin-right: auto;
    position: relative;
    width: 1400px;
}

div#header {
    float: left;
    margin: 50px 15px 0 50px;
    width: 135px;
}


div#blog {
    display: inline;
    float: left;
    margin: 50px 15px 0 50px;
    width: 1080px;
}

div#site {
    float: left;
    width: 100%;
}

with:

<div id="site">
   <div id="wrap">
      <div id="header"></div>
      <div id="blog"></div>
   </div>
</div>

So, site covers window, ‘wrap’ is fixed width and is centered and ‘header’ and ‘blog’ are inside ‘wrap’ with defined width.

The problem is as usual with IE6. ‘blog’ is shown under the ‘header’. So it seems that float and/or margin does not work.

It seems that it’s not a double margin float bug, at least in DebugBar I see correct margins, but also there are some offsets (50px for header), which I don’t know what it is, actually. Anyway, i tried to add ‘display: inline’ to both ‘header’ and ‘blog’, and it does not help.

I don’t have ie7 to see, but it does show correctly in ie8.

I went through several tutorials on floating bugs for ie6, but could not find a solution for my problem (or i might have missed it).

Any ideas how to ‘heal’ it without adding extra div’s (i hope it’s possible with css, like with doublemargin bug)

p/s/ total width of divs with margin is 1345 < 1400.

EDIT1:
the only thing that is strange is ‘wrap’ has 0 height.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T00:50:16+00:00Added an answer on May 25, 2026 at 12:50 am

    EDIT1: the only thing that is strange is ‘wrap’ has 0 height.

    Please read http://www.quirksmode.org/css/clearing.html . However, the described issue doesn’t appear in IE6 because of another bug; floats are automatically cleared.

    Also, to prevent double-margin bug, make sure you define display:inline for all floating elements. Avoid adding display: inline to #wrap, it’ll cause the previous issue (#blog appearing under #header).

    edit: I was able to reproduce the issue at reznikdavydov.com. Inside #header, there is a <div class=menu> which has width: 300px set. The bug in IE6 causes that the wrapper (#header) is incorrectly expanded so that div.menu cannot overflow out of it. This is the reason why #header and #blog cannot fit side by side: the computed with of #header is 135px in modern browser, but 300px in IE6. The solution is to remove the width:300px rule from .menu selector.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following css code .container { width:800px; background-color:yellow; margin:auto; display:table; } .cell
basicaly I have the following HTML/CSS Layout HTML: <div id=container> <div id=main> <h1>TEST</h1> </div>
I have css code to do layout. i have basic header panel, footer, left
I have the following div layout: Everything is fine when I put normal txt
I have the following 3 column layout: <div id=outerwrap> <div id=innerwrap> <div id=centerc>...</div> <div
I have a dual column layout using CSS: <div id=nav></div> <div id=left_column></div> <div id=right_column></div>
Say I have the following DIVs: <div id=top>Page header</div> <div id=main>Main content</div> <div id=sidebar>Sidebar
I have the following DIV layout which translates as little clickable buttons on the
I have a centered layout using margin:0 auto; , but one of my child
I have a two column layout: <html> <head></head> <body> <div id=container> <div id=header></div> <div

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.