homepage Welcome to WebmasterWorld Guest from 54.227.12.219
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
Setting div width in stylesheet vs. inline
IE vs Mozilla div oddness
CTMiller




msg:1175692
 3:03 pm on Apr 1, 2004 (gmt 0)

Hello all...

Got something of a silly question. I'm sure it's common, but I'd not come across it yet.

I'm trying to set the width of a div in my style.css:

helpbox {

width=300px;
border:1px solid silver;
background-color: #E9EDF7;
padding: 10px;

}

In IE, the div renders at 300px. In Mozilla, it renders at 100% of the screen width. If I set the div width inline via the style="" attribute, it works, but there are a LOT of help boxes in this app, and the idea of doing this individually fills me with horror. It doesn't seem to be a nesting problem...I can duplicate it in a blank page outside my app.

What am I missing?

My thanks,
Chris

 

CTMiller




msg:1175693
 3:04 pm on Apr 1, 2004 (gmt 0)

Sorry. The above example is missing the .

It should be:

.helpbox {

width=300px;
border:1px solid silver;
background-color: #E9EDF7;
padding: 10px;

}

Sorry for the typo. This is how it looks in my stylesheet.

benihana




msg:1175694
 3:14 pm on Apr 1, 2004 (gmt 0)

width=300px;

heres the problem, should be

width:300px;

dave_f




msg:1175695
 3:16 pm on Apr 1, 2004 (gmt 0)

Hi Chris,

Try setting width:300px; - you have width=300px;

Dave

CTMiller




msg:1175696
 3:16 pm on Apr 1, 2004 (gmt 0)

Oy.

I'm an idiot.

Thank you. *hangs head in shame*

benihana




msg:1175697
 3:18 pm on Apr 1, 2004 (gmt 0)

easily done :)

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