|
Posted by Jukka K. Korpela on 08/14/07 09:12
Scripsit Neredbojias:
>> my web client really likes the "translucent" look of the default
>> borders that are used as part of the <table> tag, with CELLSPACE as 2
>> and BORDER as 1.
>>
>> is there any way to emulate this in CSS?
>
> If they are the _default_ borders, why do you have to emulate them?
I'd rather ask why that should be done in CSS when there is a clear idea of
how to achieve the desired effect in HTML. Just as a matter of principle? Or
because there are zillions of tables to consider, or some style sheet that
set table borders that need to be overridden?
A border of one pixel is _not_ the default, but _if_ a border is set using
<table border="1">, then the apperance is by default an outset border, which
is probably what is meant by "translucent" here.
Anyway, the CSS counterpart of border="1" in a <table> tag consists of
border-width: 1px; border-style: outset;
for the table and
border-width: 1px; border-style: inset;
for each cell.
The CSS counterpart to cellspacing="2" is border-spacing: 2px, but this
isn't supported by IE.
More info on mapping presentational HTML to CSS:
http://www.cs.tut.fi/~jkorpela/html2css.html
P.S. I'm pretty sure most users find "translucent" borders unpleasant. They
look too vague to be useful, yet noticeable enough to be an esthetic
nuisance. A solid border, perhaps set to some other color than black, is
usually better.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Navigation:
[Reply to this message]
|