PDA

View Full Version : some of my css properties are not working.


Andromeda
03-20-2007, 07:49 AM
http://www.wtl.org.nz/constr/index.html
shows that my attempt at using css is half working but that's all.

in tab001 the:
vertical-align and padding are not working and I can't see why.

Can someone please put me out of my misery (again).

Css is as follows:


Body {font-family: Tahoma, Verdana, Arial; font-size: 10pt; color: #ff0000; background: url(../images/bround.gif); }

a:link { font-family: Tahoma, Verdana, Arial; font-size: 10pt; color: #0066aa; text-decoration:none;}
a:visited { font-family: Tahoma, Verdana, Arial; font-size: 10pt; color: #0066aa; text-decoration:none;}
a:hover { font-family: Tahoma, Verdana, Arial; font-size: 10pt; color: #0066aa; text-decoration:underline;}
a:active { font-family: Tahoma, Verdana, Arial; font-size: 10pt; color: #0066aa; text-decoration:none;}

table.tab001 {width:800px; vertical-align:top; background:#00FFFF; border-left:solid 8px #FF0000; border-right:solid 8px #FF0000; border-bottom:solid 8px #FF0000; padding:15px;}

PS. In case you're wondering, the blue background won't be staying - it just proves that at least SOME of my css is working!!!

ramandeep
03-20-2007, 11:25 AM
As far as i can see you are giving vertical alignment to table and it is behaving correctly as per your alignment and padding given.

The vertical-align property sets the vertical alignment of an element and is not inherited.

So give it to <TD> instead and it will work.

Suggestion:
you can try writing the page using layers and CSS, thats the way to go and wont be difficult for you.

domedia
03-20-2007, 02:27 PM
With Raman here.. Setting vertical-align on a table tag won't do anything I think.. It will only work on inline elements and table cells.

Andromeda
03-21-2007, 04:59 AM
Thank you both. Works a treat.

Suggestion:
you can try writing the page using layers and CSS, thats the way to go and wont be difficult for you.


raman, just wanting to understand you correctly, you are suggesting I do away with tables and use layers instead with my css?

I'm not familiar with layers so what property do I use to get the css to work on a layer? What I mean by this is, with my table I'm using "table.tab001" What do I use for a layer?