Forum Moderators: not2easy
View the issue here : <snip>
The Code I have for this external CSS file is here:
table.one
{border-color: #FFFFFF;
border-collapse: collapse;
border-style: solid;
border-width: thin;
background-color: #FFFFFF;
table-layout: automatic}
td.a1
{border-color: #003366;
border-width: thin;
border-style: solid;
background-color: #FFFFFF;
padding: 1%;
text-align: center}
and the HTML:
<table width="75" cellspacing="0" cellpadding="0" align="center">
<tr>
<td class="a1" width="33%"><a href="2000.html"><img src="3.jpg" /></a>
</td>
<td class="a1" width="33%"><img src="2.jpg" />
</td>
<td class="a1" width="33%"><img src="1.jpg" />
</td>
</tr>
<tr>
<td class="a1" width="33%"><img src="1.jpg" />
</td>
<td class="a1" width="33%"><img src="2.jpg" />
</td>
<td class="a1" width="33%"><img src="3.jpg" />
</td>
</tr>
</table>
What am I doing wrong? Or what did I leave out that I'm missing? I need to show this small bit of work to the guy today...
[edited by: SuzyUK at 8:35 pm (utc) on June 28, 2007]
[edit reason] Please no URI's per TOS #13 [WebmasterWorld.com] [/edit]
td img { border: 6px solid #fff; }
[edit] also, this doesn't affect the layout in any way, but you could cut down on the code quite a bit if you want. instead of putting classes and widths on all the cells, you could just put one class on the table itself.
so instead of having:
<table width="75" cellspacing="0" cellpadding="0" align="center">
<tr>
<td class="a1" width="33%"><a href="2000.html"><img src="3.jpg" /></a>
</td>
<td class="a1" width="33%"><img src="2.jpg" />
</td>
<td class="a1" width="33%"><img src="1.jpg" />
</td>
</tr>
<tr>
<td class="a1" width="33%"><img src="1.jpg" />
</td>
<td class="a1" width="33%"><img src="2.jpg" />
</td>
<td class="a1" width="33%"><img src="3.jpg" />
</td>
</tr>
</table> you could cut it down to:
<table class="one">
<tr>
<td><a href="2000.html"><img src="3.jpg" /></a>
</td>
<td><img src="2.jpg" />
</td>
<td><img src="1.jpg" />
</td>
</tr>
<tr>
<td><img src="1.jpg" />
</td>
<td><img src="2.jpg" />
</td>
<td><img src="3.jpg" />
</td>
</tr>
</table> the css would then be:
table.one
{width: 50%;
margin: 0 auto;
padding: 0;
border: 1px solid #FFF;
border-collapse: collapse;
background-color: #FFF;
table-layout: automatic} table.one td
{width: 33%;
border: 1px solid #036;
background-color: #FFF;
padding: 1%;
text-align: center}
Despite this flaw I did show this site to the person I needed to, and he's impressed. So I need this fixed before he calls me on Monday to tell me wether or not he's picking my design. I just for the life of me can not figure out why this one little table is shifting on me.
EDIT! -- NM I'm an Idiot, I've got it fixed now. :) Thanks for the help... My problem went away when I put table.one td instead of table.two td ... :-/