Page 1 of 1
CSS in TD tags
Posted: Thu Aug 01, 2002 11:07 am
by toppac
I want to use stylesheets to set the height and width of my TD tags. I know there is someway you can include stylesheet commands inside of a tag, like
or something along those lines. Can anyone provide some good example code of how to use inline stylesheets?
Posted: Thu Aug 01, 2002 11:26 am
by RandomEngy
<td style="height: 40px">
Posted: Thu Aug 01, 2002 12:05 pm
by volka
you may use inline style as you would do in <style>-blocks.
just assign the { ... } stuff to the style-property of the element
<element style="..."> (without { } )
I'm still addicted to
Microsoft MSDN but there are lots of other good references
(ok, slam me for beeing a microsoftie

)
Posted: Fri Aug 02, 2002 1:47 am
by twigletmac
You can add multiple CSS declarations into a single style attribute like so:
Code: Select all
<td style="width: 20%; height: 10%; background-color: #ffffcc;">
each one just has to be separated by a semi-colon (like PHP). The height and width elements of CSS aren't supported by older browsers (e.g. Netscape 4.x).
Mac