Log in

View Full Version : CSS on td tag dotted border right and left



Susie56
12-17-2013, 11:31 PM
Hi, I have coded the following CSS:

td {
border-right: 1px dotted #99493e;
border-bottom: 1px dotted #99493e;
}
which works beautifully on front page but it also tells the lightbox slideshow image to do the same and I don't want it on this part.
Can anyone help me as to what I can do, I tried it on the div tag, but both sections are in the table and the div tag.
I know tables are not popular now, but the div tag wouldn't contain images where I wanted them. Can anyone help at all?
The web page is: http://www.button-moon.co.uk/MixedMedia.html
Thanks for looking :confused:

Beverleyh
12-17-2013, 11:48 PM
You can target the td of the table you want by being more specific in your CSS.

So in the opening table tag where you want td borders, give it a class such as <table class="myTable">

And target it in your CSS like this;


table.myTable td {
border-right: 1px dotted #99493e;
border-bottom: 1px dotted #99493e;
}

To be even more specific, give all the tds (that you want to have borders) a class <td class="myBorder"> and target them like this;


td.myBorder {
border-right: 1px dotted #99493e;
border-bottom: 1px dotted #99493e;
}

Susie56
12-18-2013, 12:12 AM
Thank you so much, silly me, I know about class tags I have one on there for p.small tag! Thanks again :)