(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
05-15-24 09:40 AM
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: 6515 days
Last view: 6515 days
Posted on 04-26-06 11:02 AM Link | Quote
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: 6296 days
Last view: 6295 days
Posted on 04-26-06 04:51 PM Link | Quote
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: 6295 days
Last view: 6295 days
Posted on 04-27-06 11:59 PM Link | Quote
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: 6385 days
Last view: 6321 days
Posted on 05-03-06 08:15 PM Link | Quote
Originally posted by KP
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:






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?


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: 6541 days
Last view: 6541 days
Posted on 05-07-06 12:38 PM Link | Quote
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: 6385 days
Last view: 6321 days
Posted on 05-08-06 06:58 PM Link | Quote
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: 6541 days
Last view: 6541 days
Posted on 05-09-06 12:19 AM Link | Quote
Originally posted by MisterJones
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 :/.



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 &lt;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: 6385 days
Last view: 6321 days
Posted on 05-09-06 06:00 PM Link | Quote
Originally posted by DtTvB the Yoshi

Ouch!!!
Thanks for telling...



No problem. sorry if I sounded too harsh. I have been a little untolerant lately.

Originally posted by DtTvB the Yoshi

I don't know how to define cellpadding and spacing anyway, so that's my best way to do it.



http://www.w3schools.com/css/css_reference.asp

also

http://www.gurusnetwork.com/tutorial/css_intro/

Originally posted by DtTvB the Yoshi
"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


Makes sense. haha, silly acmlm board.
HyperHacker

Star Mario
Finally being paid to code in VB! If only I still enjoyed that. <_<
Wii #7182 6487 4198 1828


 





Since: 11-18-05
From: Canada, w00t!
My computer's specs, if anyone gives a damn.
STOP TRUNCATING THIS >8^(

Last post: 6296 days
Last view: 6296 days
Posted on 05-10-06 01:22 AM Link | Quote
It happened in your post.
Skydude

Armos Knight








Since: 02-18-06
From: Stanford, CA

Last post: 6569 days
Last view: 6569 days
Posted on 05-17-06 01:24 AM Link | Quote
Eww for broken tables.

Anyway, since I'm taking a class now that covers CSS among other things, one of the bits of advice for compatibility issues that I've been told is to put any CSS definitions at the start inside HTML comment tags, so that it's not read by browsers which don't support CSS.
DtTvB the Yoshi

Red Paragoomba


 





Since: 12-02-05
From: Thailand

Last post: 6541 days
Last view: 6541 days
Posted on 05-17-06 07:43 AM Link | Quote
When I use CSS, I usually use <link tags.
Because old browser won't display the CSS text, as well as javascript
Sometimes, I use
<style>
<!--
Some contents
-->
</style>


(edited by DtTvB the Yoshi on 05-17-06 06:44 AM)
(edited by DtTvB the Yoshi on 05-17-06 06:52 AM)
FreeDOS +

Giant Red Koopa
Legion: freedos = fritos








Since: 11-17-05
From: Seattle

Last post: 6295 days
Last view: 6295 days
Posted on 05-19-06 09:47 PM Link | Quote


Someone really needs to fix how quoting works
DtTvB the Yoshi

Red Paragoomba


 





Since: 12-02-05
From: Thailand

Last post: 6541 days
Last view: 6541 days
Posted on 05-20-06 06:19 AM Link | Quote
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 |


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.046 seconds; used 410.19 kB (max 508.27 kB)