Wrox Home  
Search P2P Archive for: Go

  Return to Index  

html_code_clinic thread: Re: Positining with CSS


Message #1 by "Dawn Jardine" <dawnj@c...> on Mon, 10 Sep 2001 18:05:26
Thanx Dawn,

But I need to position a section at the bottom of a page.  Now, not knowing
the size of a users browser window, the only way to do that is to position
it relatively..  And the only method that I know of to do that is the
valign, or vertical-align property of a table (row).

I was just wondering if there was an equivalent method of doing so using
CSS, or Div's, and not Tables.. as I thought one of the advantages of using
CSS was to NOT have to position elements of a page using tables...

Thanx again,

Andrew

-----Original Message-----
From: Dawn Jardine [mailto:dawnj@c...]
Sent: Monday, 10 September 2001 6:05 PM
To: HTML Code Clinic
Subject: [html_code_clinic] Re: Positining with CSS


You can use absolute positioning with css.  Example code below:
<style type="text/css">

p
{
position: absolute;
top: 400px;
left: 100px
}
</style>

This is positioning the paragraph <p> 400pixels from the top and 100pixels
to the left.
Hope this is helpful.

Dawn





> Hi gang,
>
> I'm attempting to get a hold of positioning with CSS, rather than using
> tables.
>
> I was wondering if there is a way to relatively position an object at
the
> bottom of the page without using tables?  I realise I can use 'vertical-
> align' or 'valign' on a <TR> tag to do the job, however the rest of the
> page is positioned using CSS references, so I'd like to continue using
> this method.
>
> Basically, I want to place a simple footer at the bottom of the browser
> window if the page is not full, otherwise at the bottom of the document
if
> it spans below the bottom of the window.
>
> (Only designing for IE5+, NS6+ at the moment..)
>
> Any ideas?
>
> Thanx in advance,
>
> Andrew


  Return to Index