Forum Moderators: open

Message Too Old, No Replies

Borders on tables

         

Dexie

5:13 pm on Nov 5, 2017 (gmt 0)

10+ Year Member



Can anyone see where this code is going wrong please? For some reason the styles for the sizes of the borders are not working? ;-(

<table cellspacing="30px" cellpadding="30px" width="96%" style="background-color:#008EA6; border-top:14px; border-right:16px; border-bottom:14px; border-left:16px; solid #008ea6;">
<tr>
<td bgcolor="#febc11" width="100%">

<table width="100%"; style="border:10px solid #febc11; cellpadding="24" border-top:13px; border-right:16px; border-bottom:13px; border-left:16px">

NickMNS

6:38 pm on Nov 5, 2017 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



typo at
cellpadding="24" 
should read
cellpadding:24; 

lucy24

6:46 pm on Nov 5, 2017 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Can anyone see where this code is going wrong please?
Snarky answer: The explanation was visible even before opening the post, because this is the HTML subforum. In the present century, presentational matters such as borders around tables are appropriately handled in CSS.

table.classname {border-collapse: separate; border-spacing: 30px; width: 95%; background-color:#008EA6; border:14px solid #FFF; border-right-width:16px; border-left-width: 16px;}
td.classname OR table.classname td ... et cetera

Seriously though ... Part of the question seems to have been cut off.

What did you intend to see? What did you actually see? What's with the fragment "solid #008ea6;" and did you really mean to set a border to the same color as the background? Can't that be done with padding instead?

Dexie

7:01 pm on Nov 5, 2017 (gmt 0)

10+ Year Member



Thanks Nick - problem solved.