We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

CSS help please

[COLOR=Red][COLOR=Black]<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
  <td width="50%"><p align="center"><img src="link removed"></p>
  </td>
<td width="50%"><b>Price Alert! Starting 01/01/09<br>After careful consideration the prices for adverts are now as follows;<br>1 week - £1.00, 1 month - £2.50, 3 months - £7.50, 6 months - £15.00.</b></td>
  </tr>
  <tr>
</table>
<div id="panel">
<table width="100%" border="0" cellspacing="0" cellpadding="3">[/COLOR]

<td width="100"><table width="128px" border="0" cellspacing="1" cellpadding="4">
         <tr>
         <td class="head"><font face="Verdana" size="2"><b><u>Advertisements</u></b></font></td>
         </tr>
<tr>[/COLOR]

Trying to get the bit in RED above to act like it should according to the CSS below but without adding this bit in the CSS file
#panel .head !! font-family:Verdana,Tahoma,Arial; font-size:8pt; color:#FFFFFF; font-weight:bold; background-color:#D90000; }
#panel a !! font-family:Verdana,Tahoma,Arial; font-size:8pt; color:#000000; text-decoration:none; }
#panel a:hover !! font-family:Verdana,Tahoma,Arial; font-size:8pt; color:#FFB31A; text-decoration:underline; }

Comments

  • I'm a little confused with what you're wanting to do, and incredibly confused by your method of coding. Firstly, you appear to have both inline and external styling
    <td class="head"><font face="Verdana" size="2"><b><u>Advertisements</u></b></font></td>
    

    This is pretty awful. You have a class for the table cell, but then use inline styling. You can change the above to:
    <td class="head">Advertisements</td>
    

    and then externally have
    .head {font:Verdana, Arial, Helvetica, sans-serif bold;
        font-size:12px;
        text-decoration:underline;
    


    Is this what you were trying to do as I'm confused by your question!?
  • Also you have no <a> tags so those styles will not affect anything
  • cally6008
    cally6008 Posts: 7,629 Forumite
    Part of the Furniture 1,000 Posts Combo Breaker
    Its like that at moment cos overall if I just use the internal code, I lose the function of the external code (eg, the writing Advertisement changes and I lose the red background that the external code is providing)

    I want to keep the red background but removing the external code screws everything up.
  • What is wrong with <td bgcolor="#FF0000">?
  • bingo_bango
    bingo_bango Posts: 2,594 Forumite
    Cally,

    I think you need to learn how to hard code properly. Have a look at http://www.w3schools.com/css/ to see how it should be done. You'll save yourself a lot of headaches in the future if you learn how to do this now. And it's easier than it looks!
  • bluboy
    bluboy Posts: 336 Forumite
    Part of the Furniture Combo Breaker
    Will this do for now? (with styles inside the 'head' tag for demonstration)
    (oh and 'open' curly bracket where the exclamation marks are - a forum quirk methinks:huh: )
    <html>
    <head><style>
    #panel .head !! font-family:Verdana,Tahoma,Arial; font-size:8pt; color:#FFFFFF; font-weight:bold; background-color:#D90000; }
    #panel a !! font-family:Verdana,Tahoma,Arial; font-size:8pt; color:#000000; text-decoration:none; }
    #panel a:hover !! font-family:Verdana,Tahoma,Arial; font-size:8pt; color:#FFB31A; text-decoration:underline; }
    </style>
    </head><body>
    <div id="panel">
    <table width="100%" border="0" cellspacing="0" cellpadding="3">
    <td width="100"><table width="128px" border="0" cellspacing="1" cellpadding="4">
             <tr>
             <td class="head">Advertisements</td>
             </tr>
    <tr>
    
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 352.1K Banking & Borrowing
  • 253.6K Reduce Debt & Boost Income
  • 454.3K Spending & Discounts
  • 245.2K Work, Benefits & Business
  • 600.8K Mortgages, Homes & Bills
  • 177.5K Life & Family
  • 259K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16K Discuss & Feedback
  • 37.7K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.