...

View Full Version : In CSS, can you specify cell borders ??



waynefrank
04-26-2011, 08:59 PM
In CSS, you can specify an id selector that specifies table borders when the id is used:

#para {
position:relative;
border-collapse:collapse;
border-style:ridge;
border-color:"#0000ff";
}

My question: In an id selector, can you specify the borders of individual table cells?

I know you can go in to the HTML for each table, and specify borders for each cell individually.

Thanks, Wayne

PS This is related to my earlier quesiton, Table border question.

effpeetee
04-26-2011, 09:10 PM
Is this any help to you. (http://www.smashingmagazine.com/2008/08/13/top-10-css-table-designs/)

Tables I hardly ever use. This is the best I can do.

Frank

teedoff
04-26-2011, 09:10 PM
Then I'll post the same response I did in your other thread.


I have to ask why are you using tables at all? Read about why tables for layouts are bad here (http://www.hotdesign.com/seybold/).

DanInMa
04-26-2011, 09:24 PM
short answer, yes, but it can be a pain and some browsers don't like it very much.

The fact that your also using postion:relative makes me wonder if what you are doing is a bad idea in the first place, though. You might want to look at the link Teedoff provided.

a more informative article can be found here - http://webdesign.about.com/od/layout/a/aa111102a.htm

waynefrank
04-26-2011, 09:59 PM
OK from reading one of the links posted, I now see that I can code:

#para td { ...

The td is new. That makes it apply to the cells, instead of the whole table.

Thanks, all



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum