Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old March 8th, 2006, 01:05 PM
Andrew Poulos
Guest
 
Posts: n/a
Default Set element height to 100% - 50px

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
  #2  
Old March 8th, 2006, 03:59 PM
Spartanicus
Guest
 
Posts: n/a
Default Re: Set element height to 100% - 50px

Andrew Poulos <ap_prog@hotmail.com> wrote:
[color=blue]
>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.[/color]

position:absolute;top:0;right:0;bottom:50px;left:0

But don't expect that to work in IE.

--
Spartanicus
  #3  
Old March 8th, 2006, 05:25 PM
Stan Brown
Guest
 
Posts: n/a
Default Re: Set element height to 100% - 50px

Wed, 08 Mar 2006 23:48:50 +1100 from Andrew Poulos
<ap_prog@hotmail.com>:[color=blue]
> 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.[/color]

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
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles