Irish SEO,  Marketing & Webmaster Discussion

 

CSS Issue for Wordpress Menu..

This is a discussion on CSS Issue for Wordpress Menu.. within the Coding Help forums, part of the Webmaster Help category; Hi, i'm using the following CSS code to style a menu in wordpress. The php code to render the menu ...


Go Back   Irish SEO, Marketing & Webmaster Discussion > Webmaster Help > Coding Help

Register Forum Rules FAQDonate Members List Calendar Search Today's Posts Mark Forums Read


Notices

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-12-2006, 02:39 PM
Cormac's Avatar
Cormac Moylan
 
Join Date: Jan 2006
Location: Baile Ath Cliath / Corcaigh
Posts: 1,251
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Cormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud of
Send a message via AIM to Cormac Send a message via MSN to Cormac Send a message via Yahoo to Cormac Send a message via Skype™ to Cormac
Default CSS Issue for Wordpress Menu..

Hi, i'm using the following CSS code to style a menu in wordpress. The php code to render the menu is displayed below. The code is meant to display menu items in a block style but as you can see from the screen shots below it is not having the desired affect.

Menu Correct is how the menu is meant to be displayed and Menu Wrong is what i'm getting from the code below. Does anyone why the error is occuring?

Thanks
Code:
h4 {
    font-weight:700;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #000000;
    margin: 0 0 0px 0px;
    padding: 0px 0 0px 0px;
    text-align: left;
    display: block;
}

#showentry {
    margin: 0;
    padding: 0;
    display:block;
}

#showentry a {
    text-decoration:none;
}
#showentry:hover {
    color: #ffffff;
    display:block;
    background-color:#FF7324;
}
the php code to display the menu is

PHP Code:
<div id="showentry">
<ul>
<h4><?php wp_list_cats(); ?></h4>
</ul>
</div>
Attached Images
File Type: png menu-correct.png (1.3 KB, 2 views)
File Type: png menu-wrong.png (1.6 KB, 2 views)
__________________
blog | Geansaí Gorm - Written entirely in, awful, Irish! | Me on Blue Jumpers
*
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 03-12-2006, 02:42 PM
daviddoran's Avatar
Wannabe Geek
Recent Blog: iMSISS
 
Join Date: Aug 2006
Location: Meath, Ireland
Posts: 342
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
daviddoran will become famous soon enough
Default

Are all the list entries going to be inside that H4. Despite being invalid I imagine it will affect them.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 03-12-2006, 02:53 PM
Cormac's Avatar
Cormac Moylan
 
Join Date: Jan 2006
Location: Baile Ath Cliath / Corcaigh
Posts: 1,251
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Cormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud of
Send a message via AIM to Cormac Send a message via MSN to Cormac Send a message via Yahoo to Cormac Send a message via Skype™ to Cormac
Default

yes, the list values will all be inside the h4, how is it invalid?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 03-12-2006, 02:56 PM
daviddoran's Avatar
Wannabe Geek
Recent Blog: iMSISS
 
Join Date: Aug 2006
Location: Meath, Ireland
Posts: 342
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
daviddoran will become famous soon enough
Default Updated CSS

I imagine what you want is more correctly:
Code:
#showentry ul li{
    font-weight:700;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0px;
    padding: 0px;
    text-align: left;
    display: block;
    list-style:none;
}

#showentry {
    margin: 0;
    padding: 0;
    display:block;
    width:300px;
}

#showentry ul li a {
    text-decoration:none;
    color: #000000;
    font-size: 14px;
    display:block;
    width:100%;
}
#showentry ul li a:hover {
    color: #ffffff;
    background-color:#FF7324;
    display:block;
    width:100%;
}
The HTML would be:
Code:
<div id="showentry">
  <ul>
     <li> <a href="hh">Uncat</a> </li>
     <li> <a href="hh">2cat</a> </li>
     <li> <a href="hh">AMcat</a> </li>
  </ul>
</div>
So your PHP should be:
Code:
<div id="showentry">
  <ul>
      <?php wp_list_cats(); ?>
  </ul>
</div>
And the result is: (the middle one is being hovered over)
Attached Images
File Type: png css_screen.PNG (1.6 KB, 3 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 03-12-2006, 03:12 PM
Cormac's Avatar
Cormac Moylan
 
Join Date: Jan 2006
Location: Baile Ath Cliath / Corcaigh
Posts: 1,251
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Cormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud ofCormac has much to be proud of
Send a message via AIM to Cormac Send a message via MSN to Cormac Send a message via Yahoo to Cormac Send a message via Skype™ to Cormac
Default

cheers david, that worked a treat.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
css, issue, menu, wordpress

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
Javascript/CSS menu help? ButtermilkJack Coding Help 4 16-04-2006 05:59 PM


Sponsored links

Paid On Results


All times are GMT +1. The time now is 01:32 PM.


Powered by: vBulletin Version 3.7.3, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
Hosted in Ireland by Blacknight - Test your ISP |Irish Hosting Directory| Armchair.ie|Logo by Eden Web Design|Avatars by Afterglow |Latest Blog Entries | VPS HostingAd Management by RedTyger

Search Engine Friendly URLs by vBSEO 3.2.0