Click to See Complete Forum and Search --> : Div Height


AntonioMainenti
03-16-2003, 06:56 PM
For some reason, when I'm trying to write a div that has a height of 1 (or some other small number), it shows up on the screen as having a height of 20. What I want to do is simply make a little black box using the div tag. So I was wondering how I would make this work.

Thanks, Alan.

nkaisare
03-16-2003, 07:08 PM
Maybe use style="border: 1px solid black" ???

AntonioMainenti
03-16-2003, 07:18 PM
That produces a <hr> type thing, and when I adjust the width to 1, it changes the height to 20...

khaki
03-16-2003, 11:12 PM
Hi Antonio...

Post the code that you are using so that we can see what exactly may be causing this problem (something definitely doesn't sound right... that's for sure).

I adjust my <div> height all the time... and yet I continue to remain 5'6"...
k

JerryWMac
03-17-2003, 09:19 AM
<div style="position:relative; width:5; height:6; overflow:hidden; float:left; background-color:black;"></div>

Not absolutely certain, but try changing the word relative to Absolute:

<div style="position:absolute ; width:5; height:6; overflow:hidden; float:left; background-color:black;"></div>

Maybe that helps...? :)
Tried this in my HTML editor then IE and seems to work..?

khaki
03-17-2003, 09:35 AM
Hi Jerry...

absolute and relative will both work...
it just depends on how it is being used within the overall structure of the page.

And by the way, I was originally baffled at Dave Clark's tiny little box (5x6). I was like.. "huh?".
Now I get it (very creative).

not as tiny as that box! ...
k