HighDots Forums  

Use 100% of window space

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Use 100% of window space in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jens Müller
 
Posts: n/a

Default Use 100% of window space - 10-14-2007 , 02:54 AM






Hello,

My <div>-Element should use all the space available in the browser
window, I want no borders on one of the four sides.

With a css padding, border and margin of 0px, I still get a border.

I tried with negative margins, however, this only works for the top and
left borders which now vanish, however doubling the size of the borders
below and right of the <div>-object:

<Style>
body {
border-width: 0;
}
#ext {
padding: 0px;
margin-top: -10px;
margin-left: -10px;
border: 0px;
}
</Style>
</head>
<body scroll="no"><div id="ext">
<OBJECT classid="clsid:12345678-9ABCDEF12-3456-789012345678"
width="100%"
height="100%"
hspace="0"
vspace="0"
tabindex="0">
</OBJECT></div>
</body>

Any idea how to get rid of all borders?

Thanks!


Reply With Quote
  #2  
Old   
Ben C
 
Posts: n/a

Default Re: Use 100% of window space - 10-14-2007 , 03:51 AM






On 2007-10-14, Jens Müller <me4 (AT) privacy (DOT) net> wrote:
Quote:
Hello,

My <div>-Element should use all the space available in the browser
window, I want no borders on one of the four sides.

With a css padding, border and margin of 0px, I still get a border.

I tried with negative margins, however, this only works for the top and
left borders which now vanish, however doubling the size of the borders
below and right of the <div>-object:
Negative margins are not a good way to achieve this.

The gaps are due to margin on body. Those gaps may be different in
different browsers depending on their defaults or on how users have set
them up.

Solve the original problem with:

html, body { margin: 0; padding: 0 }

Then you shouldn't need the negative margins.


Reply With Quote
  #3  
Old   
Jens Müller
 
Posts: n/a

Default Re: Use 100% of window space - 10-14-2007 , 04:46 AM



Ben C wrote:
Quote:
The gaps are due to margin on body. Those gaps may be different in
different browsers depending on their defaults or on how users have
set them up.

Solve the original problem with:
html, body { margin: 0; padding: 0 }
Thank you, perfect!

Jens



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.