469,306 Members | 1,903 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,306 developers. It's quick & easy.

make style on grids of table

sam
Hi,

I want to use style on the grids of table.
Currently it use default style of the html table, in which the grid size
appeared very thick.

How can I change the "thick" style of the default table to "slim"?

Thanks
Sam
Jul 23 '05 #1
1 2419
sam <sa*****@authtec.com> wrote:
I want to use style on the grids of table.
Then your question might belong to c.i.w.a.stylesheets rather than here.
But please explain what you mean by "the grids" here.
Currently it use default style of the html table, in which the grid size
appeared very thick.
I suppose "grid" refers here to borders around table cells. By default,
common browsers draw _no_ borders, so you must have done something to
create some borders. As usual, posting the URL would make it possible to
help better and faster.

If you use a border attribute in <table> with a positive value, say
border="5", then there's that wide (in pixels) a border around the table as
a whole and some borders around the cells as well. (The latter is actually
caused by the fact that nonzero border value implies rules="all".)

The properties of the borders around cells depend on the browser and cannot
be suggested in HTML. They are typically narrow (one pixel) and grey.
You can suggest their color, width, and type in CSS, e.g.
<style type="text/css"> table, th, td { border: red 2px solid; } </style>
How can I change the "thick" style of the default table to "slim"?


So I don't really see what you mean by "thick" here, since the typical
browser default is as thin as you can get. Maybe you mean the _spacing_
between the cell borders? That's typically a few pixels by default and can
be affected in HTML using a cellspacing attribute in the <table> tag.
If you use <table cellspacing="0">, the spacing vanishes and the borders
are joined (CSS equivalent: border-collapse: collapse), so that if you have
set e.g. the border width to 2px (using the CSS code above), there will be
a 2px (not 4px) border between cells.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Federico Moschini [328594] | last post: by
6 posts views Thread by Tim Cartwright | last post: by
16 posts views Thread by Miguel Dias Moura | last post: by
6 posts views Thread by scottyman | last post: by
4 posts views Thread by ashkaan57 | last post: by
8 posts views Thread by Rick | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.