Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Button styles 1

Status
Not open for further replies.

crabgrass

Technical User
Aug 29, 2007
111
US
Given the following:
<code>
<style>
button.rolodex{width: "50";}
</style>
</head>
<body bgcolor="gray">
<!-- Start of FORM -->
<form method="post" action="">

<input type="button" name="" value="A" class="rolodex">
</code>

Shouldn't the width of the button be 50? How would you define and reference a class to set the button width?

Also, how would you define and reference a class to assign the bgcolor in a table cell <TD>?

Thanks
 
50 what? you need to give your measurements units. inches, pixels, percent? Values in a CSS don't need to me quoted either and just use the class name:
instead of
Code:
button.rolodex{width: "50";}

just do:

Code:
.rolodex{width:50px;}



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
crab, just remove the button part and the quotes

Code:
.rolodex{width: 50px;}

for your second question, if you want it to apply to all cells then just use
Code:
td {
background: blue;
}

or you can use a class as above

Code:
.tdClass{
background:red;
}
....

<table>
<tr>
<td class="tdClass">
etc...

Cheers

nick
 
Thanks guys. I was close but no cigar. I had tried including the px to designate pixels but of course without the rest it didn't work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top