HighDots Forums  

Set element height to 100% - 50px

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


Discuss Set element height to 100% - 50px in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Andrew Poulos
 
Posts: n/a

Default Set element height to 100% - 50px - 03-08-2006 , 07:48 AM






Is there a way to set the height of an element to 100% - 50px without
having to run some javascript to do it? Basically I want to tell the
element to be as high as the window allows but start 50 pixels up from
the bottom of the window.

With frames you can do something like rows="*,50"

Andrew Poulos

Reply With Quote
  #2  
Old   
Spartanicus
 
Posts: n/a

Default Re: Set element height to 100% - 50px - 03-08-2006 , 10:38 AM






Andrew Poulos <ap_prog (AT) hotmail (DOT) com> wrote:

Quote:
Is there a way to set the height of an element to 100% - 50px without
having to run some javascript to do it? Basically I want to tell the
element to be as high as the window allows but start 50 pixels up from
the bottom of the window.
position:absolute;top:0;right:0;bottom:50px;left:0

But don't expect that to work in IE.

--
Spartanicus


Reply With Quote
  #3  
Old   
Stan Brown
 
Posts: n/a

Default Re: Set element height to 100% - 50px - 03-08-2006 , 12:13 PM



Wed, 08 Mar 2006 23:48:50 +1100 from Andrew Poulos
<ap_prog (AT) hotmail (DOT) com>:
Quote:
Is there a way to set the height of an element to 100% - 50px without
having to run some javascript to do it? Basically I want to tell the
element to be as high as the window allows but start 50 pixels up from
the bottom of the window.
Why not margin-bottom:50px or padding-bottom:50px?

But please think and think again before denominating any measurement
in pixels (or points, for that matter). Almost every time somebody
posts a use of points or pixels on this newsgroup, it ought to be em
or % instead.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you


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.