Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS - bottommargin in IE

Status
Not open for further replies.

webrex

Vendor
Aug 25, 2005
8
DK
Why doesn't the browser (IE) show bottommargin - (and margin-right when minimized) on this div - which should contain a site?
 
umm

because when a window is minimsed it goes into the taskbar so you can't actually see anything in the window.

Can you perhaps rephrase the question?

Foamcow Heavy Industries - Web design and ranting
Target Marketing Communications - Advertising, Direct Marketing and Public Relations
I wonder what possesses people to make those animated gifs. Do you just get up in the morning and think, "You know what web design r
 
Here is the code - this doesn't work?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<title>Nyt dokument</title>

</head>

<body style="height: 100%; width: 100%; padding: 0px; margin: 0px; background-color: white; text-align: center;">

<div style="height: 100%; width: 770px; margin: 5px auto; padding: 50px; background-color: blue; position: relative; "> Hej lortet virker ikke!?



</div>
</body>
</html>
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<title>Nyt dokument</title>

</head>

<body style="height: 100%; width: 100%; padding: 0px; margin: 0px; background-color: white; text-align: center;">

<div style="height: 100%; width: 770px; margin: 5px auto; background-color: blue; position: relative; "> Hej lortet virker ikke!?



</div>
</body>
</html>
 
Can you perhaps rephrase the question? "

--> I just meant, that in the case that the browser-window isn't maximized nor minimized - then I've like my site to have specific margins - but as the lastest code shows the browser doesn't show the bottom-margin - (or the margin-right when making the window smaller!)

Do you get what I mean ?-)
 
Ok, here's some food for thought. If your height is 100% of the parent which is 100% percent of the screen -- how much is the margin, be it top or bottom? In my mind, it should be roughly around 0%. If you are a follower of a different branch of math, please let me know.
 
Surely that sound reasonable ;) _ but since I havn't get it yet - and since you seems to be pro - tell me, why this doens't work? - Now the height isn't 100%, but x-px!?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<title>Nyt dokument</title>

</head>

<body style="height: 100%; width: 100%; padding: 0px; margin: 0px; background-color: white; text-align: center;">

<div style="height: 700px; width: 770px; margin: 5px; background-color: blue; position: relative; "> Hej lortet virker ikke!?



</div>
</body>
</html>
 
Ok, then what am I supposed to write if I want a 5px space between my site and the browser-window all the time. ?
 
Don't define the height of the page as "100%" would be a good starting point.

Have you tried using padding to see whether the result is better?

Why do you want your page to be 100% of the height of the window?

What happens if the content doesn't fit in the window?


Foamcow Heavy Industries - Web design and ranting
Target Marketing Communications - Advertising, Direct Marketing and Public Relations
I wonder what possesses people to make those animated gifs. Do you just get up in the morning and think, "You know what web design r
 
I just thought it was custome to write height: 100%; width: 100%; so that ALL browsers knew that the whole browser-window should be used?
 
The whole browser window will be used anyway. Providing there is enough content to fill it.

But I still don't think you are understanding that if you specify the page to be 100% then there is NOTHING LEFT for any margin. A margin is OUTSIDE the page after all.

Foamcow Heavy Industries - Web design and ranting
Target Marketing Communications - Advertising, Direct Marketing and Public Relations
I wonder what possesses people to make those animated gifs. Do you just get up in the morning and think, "You know what web design r
 
Ok - thank you for helping - but padding shouldn't be outside, I think.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top