Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trying to set a border to a table row

Status
Not open for further replies.

bopritchard

Programmer
Jan 27, 2003
199
US
i'm setting a row class to row which is supposed to set a border but i can't get it to save my life...what am i doing wrong?

My Table
Code:
<TABLE class="mnuTable" align=center cellpadding=0 cellspacing=0 id="Table1">
	<TR>
		<TD><a id="JOMenu1_mnuContactInfo" class="mnuButton1" href="blahblah">Contact Info</a></TD>
	</TR>
	<tr class="row"><td ></td></tr>
	<tr>
		<td><a id="JOMenu1_mnuAdditionalSKills" class="mnuButton2" href="blahblah">Additional Skills</a></td>
	</tr>
	<TR><TD>&nbsp;</TD></TR>
</TABLE>
My style sheet

Code:
.mnuTable
{}
.mnuTable .row
{
	position:absolute;
	z-index:-1;
	height:20px;
	background-color:#A21C1F;
	border:3px;
	border-style:solid;
	border-color:black;
}
.mnutable .row td
{
	border:3px;
	border-style:solid;
	border-color:black;
}

.mnuTable a.mnuButton1
{	
	position:relative;
	padding:5px,5px,5px,5px;
	border:#3369AA 2px solid;
	border-bottom:0px;
	height:23px;
	background-color:#a21C1F;
	color:#ffffff;	
	text-decoration: none;
	margin-bottom:-12px;
	z-index:0;
}
.mnuTable a.mnuButton1:hover
{
	text-decoration: underline;
}
.mnuTable a.mnuButton1:active
{
	text-decoration: underline;
}

.mnuTable a.mnuButton2
{	
	padding:5px,5px,5px,5px;
	border:#3369AA 2px solid;
	border-top:0px;
	height:23px;
	background-color:#a21C1F;
	color:#ffffff;	
	text-decoration: none;
	margin-top:20px;
	
}
.mnuTable a.mnuButton2:hover
{
	text-decoration: underline;
}
.mnuTable a.mnuButton2:active
{
	text-decoration: underline;
}
 
Instead of
Code:
.mnuTable .row

Try
Code:
.mnuTable tr.row

However, your CSS looks a bit... "woooah!".

Why are you trying to absolutely position and set a z-index on a table row?!

Try and do it on a plain table. Then think about what you are trying to achieve.

Foamcow Heavy Industries - Web design and ranting
Buy Languedoc wines in the UK
 
I'm not sure it's possible to do this but...

Instead of
Code:
.mnuTable .row

Try
Code:
.mnuTable tr.row

However, your CSS looks a bit... "woooah!".

Why are you trying to absolutely position and set a z-index on a table row?!

Try and do it on a plain table. Then think about what you are trying to achieve.

Foamcow Heavy Industries - Web design and ranting
Buy Languedoc wines in the UK
 
Your td in the row with a class of row has no content. If a table cell has no content, by default it will not have any borders as well. This can be controlled by [tt]empty-cells: show;[/tt] property, which unfortunately is not supported in IE. For the latter, you will need to put something in the cell, usually [tt]&nbsp;[/tt] will do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top