div going too wide in i.e.

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
parisja

div going too wide in i.e.

Post by parisja »

Hey,

The #sidebar div on my page is going too wide in i.e. Its going out of the wrapper either though the width is set to a %.

http://www.followingparis.com

Any ideas? TIA
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: div going too wide in i.e.

Post by Dr.CSS »

you may have to use the IE hack on the #main and #side bar, IE adds the width and margin and the padding to come up with the size of the "box"... if you use Firefox with the Web Developer extension you can edit CSS in real time and get it the way you like it and copy/paste it in your CSS, but it can't edit in IE mode, but it also will outline your divs and i saw that your outline extended past the right side about as much the white line that went up to the top of the page in IE... Firefox kept it in where it is supposed to be but IE... :( well what can i say.. other than IE sucks for a web designer...
leave the ones you have now the way they are only IE reads these hacks, put your new style directly below the originals...
you can call all your margins at once like so..
top, right, bottom, left, clockwise so your original would be  10px 0px 10px 10px

    HTH

#main {
margin-top: 10px 0px 10px 10px;
      margin-right: 0px;
      margin-bottom: 10px;
      margin-left: 10px;
float:left;
width:75%;
background-color:#FFFFFF;
}

* html body #main {
margin: 0px;    start here and add them till you get what you need...   
float:left;
width:75%;  and you may need to change the %...
background-color:#FFFFFF;
}

#sidebar {
margin-top: 5px;
        margin-right: 0px;
        margin-left: 0px;
        margin bottom: 0px;
float:right;
width:20%;
background-color:;
}

*html body #sidebar {
margin: 5px 0px 0px 0px;
float:right;
width:20%;
background-color:;
}
parisja

Re: div going too wide in i.e.

Post by parisja »

Thanks mark so much!!

I really appreciete you taking the time to explain what the problem is! If your curious, the problem wasn't the #main, #sidebar div's it was the wrapper, but thanks to you explaining what the problem was I was able to find it and fix it!

Thanks!
Locked

Return to “Layout and Design (CSS & HTML)”