Member Panel


Sponsors and Ads

Live Tag Cloud

PC Forum PC Help Forum » Web & Networking » Web Design » CSS and Tables

Web Design - CSS and Tables posted in the Web & Networking forums; I have a rather simple table, with no borders at all. Now I want to make a line, between the bottom of the first row and the top of the ...

JOIN US NOW to remove these Ads

PC Help Forum, the number one FREE computer support website in the search engines
Post New Thread  Reply
  #1  
Old 09-03-2006
Ge64's Avatar
P C H F R 0 0 l Z
 
Join Date: Oct 2005
Location: Hong Kong
Posts: 232
PC Experience: Good at least
Ge64 - See this Members User comments on their Profile page
Send a message via MSN to Ge64
Default CSS and Tables

I have a rather simple table, with no borders at all. Now I want to make a line, between the bottom of the first row and the top of the second row. So it looks like this:

Col 1 COl2 Col3
------------------------------
Aasdad blabla lalala
blalbla asdasd qwerty

Except I don't want the line to take up any space. So is there an option in CSS that would make a border around only the first row and then only the bottom, not all the way around?


__________________
PCHF RoX ur SoX
:computer1
PC SmAsH0R
  #2  
Old 09-04-2006
tarvid's Avatar
New Poster
My PC
 
Join Date: Sep 2006
Posts: 1
tarvid - See this Members User comments on their Profile page
Default

Separate tables with the same explicit width?


  #3  
Old 09-04-2006
GaRHaR's Avatar
Tech Support Team
My PC
 
Join Date: Jul 2006
Location: Western Australia
Posts: 6,095
PC Experience: Elite PC Guru
GaRHaR - See this Members User comments on their Profile page GaRHaR - See this Members User comments on their Profile page GaRHaR - See this Members User comments on their Profile page GaRHaR - See this Members User comments on their Profile page GaRHaR - See this Members User comments on their Profile page GaRHaR - See this Members User comments on their Profile page
Send a message via ICQ to GaRHaR Send a message via MSN to GaRHaR Send a message via Yahoo to GaRHaR
Default

Hi Ge64...hopefully this helps you.

11.3.1 Borders and rules

The following attributes affect a table's external frame and internal rules.
Attribute definitions
frame = void|above|below|hsides|lhs|rhs|vsides|box|border [CI]This attribute specifies which sides of the frame surrounding a table will be visible. Possible values:
  • void: No sides. This is the default value.
  • above: The top side only.
  • below: The bottom side only.
  • hsides: The top and bottom sides only.
  • vsides: The right and left sides only.
  • lhs: The left-hand side only.
  • rhs: The right-hand side only.
  • box: All four sides.
  • border: All four sides.
rules = none|groups|rows|cols|all [CI]This attribute specifies which rules will appear between cells within a table. The rendering of rules is user agent dependent. Possible values:
  • none: No rules. This is the default value.
  • groups: Rules will appear between row groups (see THEAD, TFOOT, and TBODY) and column groups (see COLGROUP and COL) only.
  • rows: Rules will appear between rows only.
  • cols: Rules will appear between columns only.
  • all: Rules will appear between all rows and columns.
border = pixels [CN]This attributes specifies the width (in pixels only) of the frame around a table (see the Note below for more information about this attribute).
To help distinguish the cells of a table, we can set the border attribute of the TABLE element. Consider a previous example:
<TABLE border="1"
summary="This table charts the number of cups
of coffee consumed by each senator, the type
of coffee (decaf or regular), and whether
taken with sugar.">
<CAPTION>Cups of coffee consumed by each senator</CAPTION>
<TR>
<TH>Name</TH>
<TH>Cups</TH>
<TH>Type of Coffee</TH>
<TH>Sugar?</TH>
<TR>
<TD>T. Sexton</TD>
<TD>10</TD>
<TD>Espresso</TD>
<TD>No</TD>
<TR>
<TD>J. Dinnen</TD>
<TD>5</TD>
<TD>Decaf</TD>
<TD>Yes</TD>
</TABLE>

In the following example, the user agent should show borders five pixels thick on the left-hand and right-hand sides of the table, with rules drawn between each column.
<TABLE border="5" frame="vsides" rules="cols">
<TR> <TD>1 <TD>2 <TD>3
<TR> <TD>4 <TD>5 <TD>6
<TR> <TD>7 <TD>8 <TD>9
</TABLE>

The following settings should be observed by user agents for backwards compatibility.
  • Setting border="0" implies frame="void" and, unless otherwise specified, rules="none".
  • Other values of border imply frame="border" and, unless otherwise specified, rules="all".
  • The value "border" in the start tag of the TABLE element should be interpreted as the value of the frame attribute. It implies rules="all" and some default (non-zero) value for the border attribute.
For example, the following definitions are equivalent:
<TABLE border="2">
<TABLE border="2" frame="border" rules="all">
as are the following:
<TABLE border>
<TABLE frame="border" rules="all">

Note. The border attribute also defines the border behavior for the OBJECT and IMG elements, but takes different values for those elements.


__________________


"Study without desire spoils the memory, and it retains nothing that it takes in."
- Leonardo da Vinci

"I believe in Christianity as I believe that the sun has risen: not only because I see it, but because by it I see everything else."
- C. S. Lewis

Reply
New! Norton Internet Security 2008 – Download Now Click Here

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On


All times are GMT +1. The time now is 02:44 PM.
Powered by vBulletin
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC7
All Graphics & Content Copyright © 2004-2008 - PC Help Forum.com


Back to Top