6 replies [Last post]
zeeker
Offline
Regular
Last seen: 15 years 40 weeks ago
Joined: 2003-10-11
Posts: 11
Points: 0

I am trying to set a div's hieght to 10px...it won't do it. Is it possible? and how?

Thanks

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 2 days 18 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

Div heights no smaller than 15px?

Hi zeeker,
It should be possible, but first you need to spell height correctly Smile
A couple of things you should check is the document is in strict mode (has a valid doctype etc) there has been plenty of talk about this on the forums and links can be found in useful css links ).
The content of the div should be smaller then 10px, you may want to set the line-height and overflow properties as well.

Hope that helps.

zeeker
Offline
Regular
Last seen: 15 years 40 weeks ago
Joined: 2003-10-11
Posts: 11
Points: 0

Div heights no smaller than 15px?

Duho!!! :oops: That is what happens when you are up all night, holding onto reality only by a Vanilla Pepsi and icecream float... Wink

There is currently nothing in the div. So I figured that the height should be set to what ever I say, no luck.

"...is the document is in strict mode?" ex please? I am very tired, not comprehending everything right now...

Will the overflow make a difference when setting the height?

zeeker
Offline
Regular
Last seen: 15 years 40 weeks ago
Joined: 2003-10-11
Posts: 11
Points: 0

Div heights no smaller than 15px?

Line-height did the trick...errr...I hate the learning process...

Laughing out loud

rocketscience
Offline
Regular
Calgary, AB
Last seen: 15 years 50 weeks ago
Calgary, AB
Joined: 2003-08-07
Posts: 16
Points: 0

Div heights no smaller than 15px?

Actually, I'm having this problem too, because of IE 5x's box model problem. I can never set a div at a height less than 12px, or IE 5x will render it at least at 12.

Workaround anyone?

Pob
Offline
Enthusiast
Hampshire UK
Last seen: 8 years 6 weeks ago
Hampshire UK
Timezone: GMT+1
Joined: 2003-08-16
Posts: 60
Points: 5

Div heights no smaller than 15px?

Hi,

Have you tried overflow:hidden.

It works in IE6 in quirks mode so I assume it will work in IE5 (but I haven't had time to check).

Paul

rocketscience
Offline
Regular
Calgary, AB
Last seen: 15 years 50 weeks ago
Calgary, AB
Joined: 2003-08-07
Posts: 16
Points: 0

Div heights no smaller than 15px?

Ha! It works and its not a hack!

Thanks POB. What a weird solution.