Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

basic css question?


  • You cannot reply to this topic
1 reply to this topic

#1 RMD27

  • Community Member
  • 259 posts
  • Real Name:Ricardo
  • Gender:Male

Posted 12 September 2011, 14:06

Hi

I have this in my stylesheet



Quote

TABLE.mancatst {
border: 5px;
border-style: solid;
border-color: #b6b7cb;
border-spacing: 2px;
padding: 5px;
}

TR.mancatsr {
background: url(/images/mancats/utils/utils-table-background.jpg); background-repeat:repeat-x; background-position:bottom;
padding:2px;
}

TD.mancatsd1 {
font-family: Verdana, Arial, sans-serif;
font-size: 10px;
width: 20%;
vertical-align:text-top;
padding:5px;
}

and this on the site

Quote

<table class="mancatst" width="100%">
<tr class="mancatsr">
<td class="mancatsd1" valign="top"><a href="brembo-c-7349.html">
<img border="0" src="images/mancats/brembo-diskoi-80-120.jpg" width="80" height="120"><br>
Δισκόπλακες - Brembo<br>
Δισκόπλακες - Original &amp; Tuning</a></font></td>
<td class="mancatsd2" valign="top"><a href="ebc-brakes-c-1.html">
<img border="0" src="images/mancats/ebc-brake-discs.jpg" width="80" height="120"><br>
Δισκόπλακες- EBC<br>
Δισκόπλακες - Tuning</a></font></td>
<td class="mancatsd3" valign="top">
<a href="tarox-c-1878.html">
<img border="0" src="images/mancats/tarox-performance-brakes.jpg" width="80" height="120"><br>
Δισκόπλακες - Tarox<br>
Δισκόπλακες - Tuning</a></font></td>
<td class="manscatd4" width="20%" valign="top"> </td>
<td class="manscatd5" width="20%" valign="top"> </td>
</tr>
</table>

for the life of me i dont see how to alter the width of the table. in the end i had to resort to adding the bit in red to get it too work

if someone can tell me what i need to do to set the width of the table in css it would be very much appreciated!

i tried adding

width: 100%;
to tr. and table.

and got absolutely nowhere. im using chrome if that makes any difference?

Edited by RMD27, 12 September 2011, 14:07.


#2 hughesca

  • Community Member
  • 133 posts
  • Real Name:Chris Hughes

Posted 12 September 2011, 14:11

Hey there RMD27!

Have a looksie here:

http://www.impressivewebs.com/width-100-percent-css/

This might help as well:

http://www.w3schools.com/cssref/pr_dim_width.asp

Peace,
Chris