Page 1 of 1

IE div problem.

Posted: Wed Oct 11, 2006 8:17 pm
by JellyFish
How can I set the height of a div in IE to 1px? In firefox and opera I could simply set the style attribute to height: 1px; but this only works in those two not IE. Note there is nothing in this div.

Another thing that IE does is have about five pixels spacing in the div at the bottom after all the content, which I do not want. EDIT: I found out the case to this. I change the div to a table and it does the same thing, thus finding out that it is the images in the div not the div. How can I get rid of the unessissary space at the bottom of these images?

Any tricks on how to do this? Thanks for reading.

Posted: Wed Oct 11, 2006 8:34 pm
by feyd
A List Apart has an article on this.

http://www.alistapart.com/articles/sandbags

Posted: Wed Oct 11, 2006 9:33 pm
by JellyFish
Thanks feyd. Let me see if I could figure out how they did it. Other then that, does it solve the problem with the images? Becuase it can't be the div doing that at teh bottom cause I tried a table and it did it too.

Posted: Wed Oct 11, 2006 9:49 pm
by JellyFish
All I could find in the css was margin-bottom. I tried setting it to 0px and didn't fix the problem. I don't know what exactly it is you want me to find out of this artical?

Posted: Thu Oct 12, 2006 6:18 am
by feyd

Code: Select all

.sandbag-right {
  border: 0; 
  padding: 0;
  font-size: 0;
  margin: 0 0 -1px 0;
  height: 2px;
  float: right; 
  clear: right;
  background: red;
}