Register | Login | |||||
Main
| Memberlist
| Active users
| Calendar
| Chat
| Online users Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album |
| |
0 users currently in Programming. |
Acmlm's Board - I3 Archive - Programming - CSS Positioning | New poll | | |
Add to favorites | Next newer thread | Next older thread |
User | Post | |||||||||||||||||||
KP Goomba Since: 03-01-06 From: Canada Last post: 6645 days Last view: 6645 days |
| |||||||||||||||||||
Hello, I am trying to make a div stretch through the whole page. I put some positioning css and put the left, right, top, and bottom positions to 0px. It works in lololol and stretches the whole page, but in internet explorer the right one doesn't seem to work. Here's the code I'm working with:
<body bgcolor="#ffffff"> <style> div { position:absolute; left:0px; top:0px; right:0px; botton:0px; background-color:#dddddd; width:100%; height:100%; } </style> <div></div> In internet explorer the div stretches to the left, top and bottom but on the right I can still see a white bar from the background color in the body. Does anyone know how I can get this to work in Internet explorer since it already works in lololol? (edited by KP on 04-26-06 10:03 AM) |
||||||||||||||||||||
Sukasa Birdo Not quite as active as before. Xkeeper supporter Xk > ||bass I IP Banned myself! Twice! Since: 11-17-05 From: Somewhere over there Last post: 6426 days Last view: 6425 days |
| |||||||||||||||||||
Try adding "margin-right:0px;" to the bottom of that CSS. I'm pretty sure that will work in IE. | ||||||||||||||||||||
FreeDOS + Giant Red Koopa Legion: freedos = fritos Since: 11-17-05 From: Seattle Last post: 6425 days Last view: 6425 days |
| |||||||||||||||||||
Try IE7, it's a script that tries to fix all the stupid HTML/CSS rendering mistakes Microsoft did in IE5.0-6.0, it works pretty will. | ||||||||||||||||||||
MisterJones Tooky Since: 12-08-05 From: Mexico Last post: 6515 days Last view: 6451 days |
| |||||||||||||||||||
Originally posted by KP I might be an ass, but why would you use a div to cover the entire page? Why does the body have inline styling using the deprecated bgcolor attribute? Also, you might want to use margins, and avoid absoulte positioning if you really want it to be a liquid layout. I am quite surprise height is working for you. |
||||||||||||||||||||
DtTvB the Yoshi Red Paragoomba Since: 12-02-05 From: Thailand Last post: 6670 days Last view: 6670 days |
| |||||||||||||||||||
My best way to do that is using tables instead of div's!
<html> <head> <style type="text/css"> #main { position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px; background-color: #ddd; width: 100%; height: 100%; } </style> <title>Page Title</title> </head> <body> <table id="main" cellpadding="0" cellspacing="0"><tr><td> I put some contents here. </td></tr><table> </body> </html> (edited by DtTvB the Yoshi on 05-08-06 11:23 PM) |
||||||||||||||||||||
MisterJones Tooky Since: 12-08-05 From: Mexico Last post: 6515 days Last view: 6451 days |
| |||||||||||||||||||
First of all, a table element, semantically speaking, should not be there at all.
Second, you are defining a class for a single element, rather than just styling an element with an id. Third, span tag to define css? I will pretend it was that you mixed up some tag names. Fourth, cell padding and cell spacing are styling elments; they should be under your style sheet, not as inline *gasp* attributes. Fifth, it seems your layout break the quote feature (it inserts me the whole topic). Either that or something is wrong there in the quote functioning :/. |
||||||||||||||||||||
DtTvB the Yoshi Red Paragoomba Since: 12-02-05 From: Thailand Last post: 6670 days Last view: 6670 days |
| |||||||||||||||||||
Originally posted by MisterJones Ouch!!! Thanks for telling... I don't know how to define cellpadding and spacing anyway, so that's my best way to do it. "Fifth, it seems your layout break the quote feature (it inserts me the whole topic)." I think the post layout didn't. It's may because of I typed <table> and when you click the quote, it changes to <table> (edited by DtTvB the Yoshi on 05-08-06 11:28 PM) |
||||||||||||||||||||
MisterJones Tooky Since: 12-08-05 From: Mexico Last post: 6515 days Last view: 6451 days |
| |||||||||||||||||||
Originally posted by DtTvB the Yoshi No problem. sorry if I sounded too harsh. I have been a little untolerant lately. Originally posted by DtTvB the Yoshi http://www.w3schools.com/css/css_reference.asp also http://www.gurusnetwork.com/tutorial/css_intro/ Originally posted by DtTvB the Yoshi |
||||||||||||||||||||
DtTvB the Yoshi Red Paragoomba Since: 12-02-05 From: Thailand Last post: 6670 days Last view: 6670 days |
| |||||||||||||||||||
Yeah, just add htmlspecialchars and it will works, htmlspecialchars all the input fields and textareas. (edited by DtTvB the Yoshi on 05-20-06 05:20 AM) (edited by DtTvB the Yoshi on 05-20-06 05:22 AM) |
Add to favorites | Next newer thread | Next older thread |
Acmlm's Board - I3 Archive - Programming - CSS Positioning | | |