Jump to content

I need a little help with difernt styles of tables


nutterz

Recommended Posts

Thanks guys, but i have been reading up on CSS through the w3schools tutorials and im having a little trouble finding the correct tutorial im after so basicly if I had "e.g." table {background-color: darkred; width: 18%} on left and right and I wanted to use difernt colors and width with the table I plan to put in the center what section fo the tutorial should I be studdying?

Link to comment
Share on other sites

A selector like "table" is a type selector. As you've discovered, it makes every instance of that element the same. What you want is a class selector. Notice:table.small {width: 10em; background-color: #ffaaaa}That definition would be used with a tag like this:<table class="small">Only tables with that class attribute will be 10em wide with a pink background.

Link to comment
Share on other sites

ok so would I be correct in using table.large {width: 60%; background-color: maroon;}with the tag <table class="large"> as the table I plan to make the second one will take up more room than the ones i already have? or should I re do the tags on my original tables and titleing them as table.small / <table class="small">

Link to comment
Share on other sites

Really, you should give both of them different classes. In the global table selector, only put information that is relevant to all tables.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...