Dave,
That's great thanks, I have one more question... I want to put some kind of cell padding into the table 'moduletable', as the output on the page looks like:
HomeNewsDev Blog
And I'd like:
Home News Dev Blog
How would I add this in?
Cheers,
Matt
-----Original Message----- From: main-bounces@lists.alug.org.uk [mailto:main-bounces@lists.alug.org.uk] On Behalf Of David Reynolds Sent: 01 November 2007 22:00 To: ALUG - mailing list Subject: Re: [ALUG] CSS problem
Matt,
On 1 Nov 2007, at 8:02 pm, mephi wrote:
Ok, this isn't directly Linux related but I know that there are some very knowledgeable people out there.
I've got some CSS code I'm having trouble with. I am building a template for a Joomla based site, and the output of one section looks like this:
<div id="headerMenu"> <div class="moduletable"> <table width="100%" border="0" cellpadding="0" cellspacing="1"> <tr> <td nowrap="nowrap"> <a href="link1.php" class="mainlevel" id="active_menu">Home</a> <a href="link2.php" class="mainlevel" >News</a> <a href="link3.php" class="mainlevel" >Dev Blog</a> </td> </tr> </table> </div> </div>
I've got the CSS for the headerMenu looks like this:
#headerMenu { float: left; padding: 0px; margin-right: 0px; width: 941px; height: 26px; background: url(../images/AdellionMenu.jpg) no-repeat;
font-family:arial, helvetica; font-size:12px; font-weight:bold; }
What I want to do now is give a colour to the links within the table.
I've tried: #moduletable{ mainlevel { A:link {color:#F7D4B6;} A:visited {color:#F7D4B6;} } }
And: #moduletable.mainlevel { A:link {color:#F7D4B6;} A:visited {color:#F7D4B6;} } } And: #moduletable#mainlevel { A:link {color:#F7D4B6;} A:visited {color:#F7D4B6;} } } And: #mainlevel { A:link {color:#F7D4B6;} A:visited {color:#F7D4B6;} }
None of which seem to work...
Can anyone see where I'm going wrong?
Yep, you want:
#headerMenu .moduletable table a { color: #F7D4B6; }
or you could probably get away with
#headerMenu a { color: #F7D4B6; }
..since there's nothing else in the div.
Thanks,
Dave