Dysan Posted January 16, 2008 Share Posted January 16, 2008 The following code displays a div. How do I get the div to display at 5px in height, in IE & FireFox? <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style> body { FONT-SIZE: 8pt; FONT-FAMILY: Verdana; PADDING: 0px; MARGIN: 0px; } #line { TOP: 100px; LEFT: 100px; WIDTH: 100px; PADDING: 0px; POSITION: absolute; BORDER: 1px solid rgb(0,0,0); }</style> </head> <body> <div id="line"></div> </div> </body> </html> Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted January 16, 2008 Share Posted January 16, 2008 this should do the trick: <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style> body { FONT-SIZE: 8pt; FONT-FAMILY: Verdana; PADDING: 0px; MARGIN: 0px; } #line { TOP: 100px; LEFT: 100px; WIDTH: 100px; PADDING: 0px; POSITION: absolute; BORDER: 1px solid rgb(0,0,0); HEIGHT: 5px; OVERFLOW: hidden; }</style> </head> <body> <div id="line"></div> </div> </body> </html> Quote Link to comment Share on other sites More sharing options...
Dysan Posted January 16, 2008 Author Share Posted January 16, 2008 That perfect! What did you change? Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted January 17, 2008 Share Posted January 17, 2008 just added this to you "line" id: HEIGHT: 5px; OVERFLOW: hidden; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.