Announcement

Collapse
No announcement yet.

CSS Help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    CSS Help

    I've added the class shown below to the centre table on my site but it isn't changing the text. If you view my index page at www you will see in the Kapa box I have written "test test" but the text has not changed, can anybody advise me what I doing wrong.

    .banner {
    font: Verdana, Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #ff6600;
    }

    #2
    Check the inheritance by using the firebug add-in in firefox. You will see that .banner is being overridden.

    Comment


      #3
      </tr><tr><td background="acatalog/Banner-II.jpg" height="85" width="444"><table border="0" cellpadding="0" cellspacing="0" width="444"><tbody><tr><td width="300">&nbsp;</td><td>test <a href="#">test </a></td><td width="15">&nbsp;</td></tr><tr><td>&nbsp;</td>
      i grabbed this from your site and can not see the css applied to the text

      Comment


        #4
        .banner is applied to the td in the parent table, rather than the text itself.

        Comment


          #5
          I'm getting a bit confued with this, I was under the impression I could add a CSS class to a table so it formatted everything within it which I thought I'd done.

          Comment


            #6
            You have added the banner class to a <td> ... the code is a child of the <td> BUT the "test test" are child tags and hence not affected... specificity is a pig with nested tags and styles.

            If you add .banner a:link to the css on the fly it changes the second "test" accordingly (this if a <href> tag) ... the first "test" does not have any containing tags so is not styled.

            You are best not styling the containing <td> but either using <span> or set an id= for the table and ensuring all the your text is wrapped in tags.



            HTH


            Bikster
            SellerDeck Designs and Responsive Themes

            Comment


              #7
              Now getting somewhere with it, thanks for all the help from everyone...

              Comment

              Working...
              X