Forum Moderators: not2easy

Message Too Old, No Replies

CSS border help

         

andrewsmd

1:47 pm on Feb 5, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a table of contents that is over another div. I would like a border on the bottom but the border won't show up when I put in the tags anyone know why. Here is the html.
<div id = "image">
<br>
<center>
<table class = "tableClass">

<tr>
<td class = "tableSpace">Carrier:</td>
<td class = "tableSpace">Current Password:</td>
<td class = "tableSpace">Date Set:</td>
<td class = "tableSpace">Previous Password:</td>
<td class = "tableSpace">Date Previously Set:</td>
</tr>

<div id = "line">
<tr>
<td class = "tableSpace">carrier name</td>
<td class = "tableSpace">password</td>
<td class = "tableSpace">date</td>
<td class = "tableSpace">password</td>
<td class = "tableSpace">date</td>
</tr>
</div>

</table>
</center>
</div>

and here is my css

#image{
background: url(images/paper2.jpg) repeat-y center center;
width: auto;
height: 55em;
text-align: center;
color: black;

}

.tableClass{
text-align: center;
color: black;
font-size: 18px;
font-weight: bolder;
text-align: center;
border-bottom: medium;

}
.tableSpace{

padding-left: 1em;
padding-right: 1em;
padding-top: 1em;
text-align: center;
border-bottom: medium;

}
FYI the image is a piece of paper and I am trying to make it look like there is lines on it.

dreamcatcher

8:31 am on Feb 6, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try:

border-bottom: 1px solid #000;

dc

andrewsmd

2:46 pm on Feb 9, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That works but there is a space where the lines come down and I want a solid line after each row. Any ideas? Here is my html and css
<table class = "tableClass">
<tr>
<td class = "tableSpace">{carrier}</td>
<td class = "tableSpace"><input type = "text" value = "{cPass}" class = "textBox" size = "10" name = "{cName}"></td>
<td class = "tableSpace"><input type = "text" value = "{cDate}" class = "textBox" size = "12" name = "{cDateName}"></td>
<td class = "tableSpace"><input type = "text" value = "{pPass}" class = "textBox" size = "10" name = "{pName}"></td>
<td class = "tableSpace"><input type = "text" value = "{pDate}" class = "textBox" size = "12" name = "{pDateName}"></td>
</tr>
</table>

CSS

.tableSpace{

padding-left: 1em;
padding-right: 1em;
padding-top: 1em;
text-align: center;
font-size: 16px;
border-bottom: 1px solid #000;

}

.tableClass{
text-align: center;
color: black;
font-size: 18px;
font-weight: bolder;
text-align: center;

}

dreamcatcher

7:24 am on Feb 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<table class = "tableClass" cellspacing="0">

dc

andrewsmd

3:43 pm on Feb 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for all of your help. It worked like a charm.

dreamcatcher

9:16 am on Feb 11, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Glad I could help.

dc

swa66

12:31 pm on Feb 11, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure what doctype (if any) you use, but a <div> between a <table> and a <tr> isn't valid html I'm afraid.

Similarly: <center> is long depreciated, and a <br> to create padding can be done with real padding or margins on the child.

Most interesting however, tables have some special properties you can set, esp. the border collapse mode is interesting.
[w3.org...]

Note that both IE6 and IE7 have crippling bugs with the conflict resolution of table borders in collapsed mode.