homepage Welcome to WebmasterWorld Guest from 54.167.185.110
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
Width problems in IE
MartinWeb




msg:4033828
 2:44 am on Nov 30, 2009 (gmt 0)

Throughout my site I have a design which consists of a white page on a black background. To make this, I set the page background color to black, and I created a div for the content in the white box. For some reason, in IE, the width parameter doesn't work, and the box collapses and displays at a random size. Here is my code:

<div id="pageContent" style=" overflow:auto; background-image:url(background.png); top:20px; left: 20px; right:20px; display:block; width:1000px; height:500px;">
Content here.
</div>

Does anyone have any suggestions? Thanks in advance.

I hope that this is in the right forum. I think that this is a CSS problem, but I'm not sure...

 

D_Blackwell




msg:4033842
 3:23 am on Nov 30, 2009 (gmt 0)

What version IE? I am not seeing "in IE, the width parameter doesn't work, and the box collapses and displays at a random size." in 7 or 8 with the markup that I plugged in.?

#pageContent {
overflow: auto; background-image: url(background.png); top: 20px; left: 20px;
/*****right: 20px;*/ /******display: block;*/ width: 1000px; height: 500px;
}

I would question the need for {display: block;}. Are there other factors on the page that would make it useful?

A particular reason that you chose position: over margin: ?

I would also question {right: 20px;}? You've set top, left, and defined the width. What does that do for you in positioning the container?

Possible that it doesn't like the .png ? IE and .png not always best of friends.

I'm not saying that any of these choices are wrong; just asking questions.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved