Results 1 to 3 of 3

Thread: CSS on td tag dotted border right and left

  1. #1
    Join Date
    Jan 2011
    Location
    Cornwall, England
    Posts
    27
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Red face CSS on td tag dotted border right and left

    Hi, I have coded the following CSS:
    Code:
    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
    Last edited by keyboard; 12-18-2013 at 02:11 AM. Reason: Format: Code Tags [code][/code]

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    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;
    Code:
    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;
    Code:
    td.myBorder {
    border-right: 1px dotted #99493e;
    border-bottom: 1px dotted #99493e;
    }
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  3. #3
    Join Date
    Jan 2011
    Location
    Cornwall, England
    Posts
    27
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    Thank you so much, silly me, I know about class tags I have one on there for p.small tag! Thanks again

Similar Threads

  1. White border on the top and left side of images in Ultimate Fade-in slideshow
    By pagan11460 in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 09-15-2010, 06:31 PM
  2. Rounded border top left and bottom right
    By nilambar in forum Submit a DHTML or CSS code
    Replies: 0
    Last Post: 11-20-2009, 09:02 AM
  3. Dotted line around tab
    By hugen in forum Dynamic Drive scripts help
    Replies: 10
    Last Post: 03-17-2009, 04:06 PM
  4. Replies: 7
    Last Post: 04-19-2008, 07:44 PM
  5. Bottom Left Border Disappearance Act
    By allezcyclist in forum Dynamic Drive scripts help
    Replies: 5
    Last Post: 07-11-2007, 11:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •