Madame Blablavatsky wrote:
> i have tables and layers in a stylesheet.
> the window people use can have a different width and height.
> i want to change the width and height of the tables/layers in the stylesheet
> depending on the
> window width and height of the user.
> i know how to get the height and width of the window using javascript, but i
> do not know
> how to get these values in the stylesheet.
Seeing as you don't mind being dependent on Javascript, you can alter
the styling of an element through Javascript. Give the element an id
and then use something of the form:
document.getElementById('elementID').style.width=( windowwidth-200)+'px';
Here 'elementID' is the ID you've given the element, and 'windowwidth'
is a variable in which you've put the size of the window. You'll want
to use pixel units as the window size is measured in pixels.
Note however, that it's a really bad idea to make your page dependent
on Javascript, and dynamic resizing can be done through a combination
of 'fluid layout' and well-written stylesheets. Start here if you want
to know more:
http://allmyfaqs.com/faq.pl?AnySizeDesign
--
Safalra (Stephen Morley)
http://www.safalra.com/programming/javascript/