Click here to Skip to main content
15,891,833 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
So I want to make a table that looks like this with only CSS/HTML.

______________
|  ---------  |
|  ---------  |
|  ---------  |
|  ---------  |
|  ---------  |
|  ---------  |
|  ---------  |
|  ---------  |
|  ---------  |
|_____________|


I don't want the "border-bottom: dotted" to go all the way from the left border to the right border. I want it to be go only ~70% of the way. So there will be some white space between the left and right borders and some dots in the center of that.
Like this |(space)............(space)|

I have searched google without any results... Please help!

Here is my code:


<style>
table.mytable {
	font-family: Source Sans Pro;
	font-size:16px;
	text-align: center;
	color:#333333;
	border-width: 1px;
	border-color: #39B2FF;
	border-collapse: collapse;
	width: 100%;
}
table.mytable th {
	background:#39B2FF url('cell-blue.jpg');
	font-family: BEBAS;
	font-size:24px;
	color: #FFFFFF;
	border-width: 1px;
	padding: 16px;
	border-style: solid;
	border-color: #39B2FF;
}
table.mytable td {
	background:#FFFFFF url('cell-grey.jpg');
	border-width: 1px;
	cellpadding: 60px;
	padding: 45px;
	border-left:1px solid;
	border-right:1px solid;
	border-bottom:1px dotted ;
	border-bottom-width: 1px;
	border-color: #39B2FF;
}
</style>

<table class="mytable">
<tr>
	<th>Header START</th>
</tr>
<tr>
	<td>Text 1A</td>
</tr>
<tr>
	<td>Text 2A</td>
</tr>
<tr>
	<td>Text 3A</td>
</tr>
<tr>
	<td>Text 4A</td>
</tr>
<tr>
	<td>Text 5A</td>
</tr>
<tr>
	<td>Text6A</td>
</tr>
<tr>
	<td>Text7A</td>
</tr>
<tr>
	<td style="border-removednone;">>Text Last</td>
</tr>
<tr>
    <th>Header END →</th>
</table>

<pre lang="HTML">
Posted
Updated 6-Mar-15 5:19am
v8
Comments
Sergey Alexandrovich Kryukov 6-Mar-15 11:00am    
Not quite clear, but it must be all about
td { border: ??? padding: ??? margin: ??? /*...*/ }
—SA

Try putting a padding around the cells.
 
Share this answer
 
Comments
Member 11503997 6-Mar-15 12:24pm    
Unfortunately, padding doesn't work.
I hope your code is working fine.

I just created a fiddle for your Code

http://jsfiddle.net/King_Fisher/crLLwmo5/[^]
 
Share this answer
 
Comments
Member 11503997 7-Mar-15 0:12am    
My code is working. Still have the problem though... :(
King Fisher 7-Mar-15 0:46am    
css may conflict in whole Project.We can't figure it out .Do one thing Comment whole css except this and Check it.
Member 11503997 7-Mar-15 10:32am    
Sorry, I'm not sure what you're saying?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900