FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Table's cells border

 


dotnet
I want to create big table(in HTML, of course) with different cells. Different cells=each cell will have its own borders. For example: cell with index 2,5 will be with thick right border, thin top/bottom border and no left border; cell with index 8,4 will be with thin left/right border and no top/bottom border; and so on. How I am going to solve this task:

1. Create all cells completely without any borders.
2. Create set of styles (css) like:
--thick right border, thick top border,......
--thin right border, thin top border,......
3. Select each individual cell and attach to it style_1 AND style_2 AND style_3 AND ....

I use Dreamweaver 8 as HTML-editor and don't have any trouble to execute steps 1,2. But step 3... I can attach to given cell any single style, but how I can attach a quantity of styles one above other? And in general - is my approach to task like this correct? May be I should use more simple solution?

Thanks a lot for your replies!
kv
The approach is right. You can create multiple css classes, one for each kind of style.

then in your html, use all the classes applicable. Simple Very Happy

For example, you want to have both top and left border for a cell,

You can use

Code:

<td class="topborder leftborder">data</td>


Most people don't know that we can use multiple classes for a single element.
dotnet
Wow! It's really amazing information, for me at least. GREAT thanks to you for this info Exclamation Exclamation Exclamation
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.