homepage Welcome to WebmasterWorld Guest from 54.227.141.230
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: DrDoc

CSS Forum

    
A href on class on LI
piznac




msg:3960569
 9:03 pm on Jul 27, 2009 (gmt 0)

Im having an issue with a dynamic menu on wordpress. I've got everything working but I cant seemt o get the link to change color on a new class.

.current_page_item{
background-color: #FFFFFF;
}
.current_page_item a {
color: #000000;
}

<ul>

<?php if(is_home() && !is_paged()){ ?>
<li<?php
if (is_home())
{
echo " class=\"current\"";
}
?>>
<a href="<?php echo get_settings('home'); ?>" title="You are Home">Home</a>
</li>
<?php } else { ?>
<li<?php
if (is_home())
{
echo " class=\"current\"";
}
?>>
<a href="<?php echo get_settings('home'); ?>" title="Click for Home">Home</a>
</li>
<?php } ?>
<!--See Note 3-->
<?php

wp_list_pages('sort_column=menu_order&title_li=');

?>

</ul>

how would I apply a link color to a class applied to a li? This does not appear to be working.

 

abidshahzad4u




msg:3961811
 3:04 pm on Jul 29, 2009 (gmt 0)

Would you explain this. As you have declared class with name different from that used in the statement. i.e. current_page_item was defined but applied one name is current.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved