CSS equivalent

T

Todd Cary

I have a <TD> that has these properties:

<td width="150" bgcolor="#336699" valign="top">

and I would like to put those properties into a CSS.

This does not work:

TD.LeftMenu {
width: 150;
position: top;
background-color: #336699;
}

No doubt I have messed up. What is the quivalent?

Many thanks...

Todd
 
K

Kevin Scholl

Todd said:
I have a <TD> that has these properties:

<td width="150" bgcolor="#336699" valign="top">

and I would like to put those properties into a CSS.

This does not work:

TD.LeftMenu {
width: 150;

150 what? bananas?
position: top;

I believe you're looking for the vertical-align property here.
background-color: #336699;

Could shorten this.
}

No doubt I have messed up. What is the quivalent?

td.leftMenu {
width: 150px;
vertical-align: top;
background: #369; }

<td class="leftMenu ">

--

*** Remove the DELETE from my address to reply ***

======================================================
Kevin Scholl http://www.ksscholl.com/
(e-mail address removed)
 
R

richard

Todd Cary said:
I have a <TD> that has these properties:

<td width="150" bgcolor="#336699" valign="top">

and I would like to put those properties into a CSS.

This does not work:

TD.LeftMenu {
width: 150;
position: top;
background-color: #336699;
}

No doubt I have messed up. What is the quivalent?

Many thanks...

Todd

Try learning what the acceptable attributes are first.
Your approach is correct. But you have not learned the proper ways of doing
it.
width? 150 what? In tables it is assumed to be pixels. But in CSS there are
other measuring tools to consider and MUST be included.
Position what? Position has nothing to do with the elements within the
division. But rather the position of the division itself. But then, perhaps
you should read about it first before implementing it.
 
L

Leif K-Brooks

richard said:
Try learning what the acceptable attributes are first. Your approach
is correct. But you have not learned the proper ways of doing it.

Obviously, neither have you. CSS doesn't have attributes.
 
?

=?iso-8859-1?Q?Kim_Andr=E9_Aker=F8?=

J

jojo

Todd said:
I must be missing something else since

http://209.204.172.137:8090/caht1/php/login.php

is without the CSS equivalent and

http://209.204.172.137:8090/caht1/php/login_2.php

with the above CSS.

Hey, didn't realise that first, but... you are using a table layout!!!
bad thing... if you decide to use CSS (which definetly is a good step!)
than use CSS for your layout, too, and get rid of those ugly tables. use
<table> *only* to describe tabular data, not for layout.

jojo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top