birdbrain

msg:4321314 | 10:05 pm on Jun 2, 2011 (gmt 0) |
Hi there greencode, does this help.... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="language" content="english"> <meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<style type="text/css"> #subnav ul li { display: inline-block; font-size:16px; font-weight:bold; line-height:36px; margin-right:25px; } #subnav ul li a { padding:0 12px; } #subnav ul li span { float:right; line-height:1.2; font-size:11px; color:#fff; background-color:#aba59e; -webkit-border-radius:8px; -moz-border-radius:8px; border-radius:8px; margin-top:6px; padding:2px 5px; } </style>
</head> <body> <div id="subnav"> <ul> <li><a href="#">Messages <span>100</span></a></li> </ul> </div>
</body> </html>
|
| birdbrain
|
greencode

msg:4321321 | 10:14 pm on Jun 2, 2011 (gmt 0) |
Hi birdbrain. I'll check this tomorrow - absolutely shattered at the moment but will reply tomorrow and let you know how I get on. Thanks for your help - really do appreciate it.
|
greencode

msg:4321456 | 8:41 am on Jun 3, 2011 (gmt 0) |
Hi birdbrain. Just realised another problem. I have a background hover on list item and so when I hover over that it only highlights the list item and not the span item. If I remove the float:right then all works okay except the alignment issue is back normal. The code I'm using for hover is:
#subnav ul li a:hover { background-color: #797979; -webkit-border-radius: 20px; -moz-border-radius: 20px; border-radius: 20px; color: #fff; }
|
birdbrain

msg:4321487 | 10:04 am on Jun 3, 2011 (gmt 0) |
Hi there greencode, try this amendment, it will give you far greater control of the elements... <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="language" content="english"> <meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<style type="text/css"> #subnav ul li { display:inline-block; font-size:16px; font-weight:bold; line-height:36px; margin-right:25px; } #subnav ul li a { display:block; padding:0 12px; text-decoration:none; } #subnav ul li a #m { text-decoration:underline; } #subnav ul li a #n { float:right; line-height:1.2; font-size:11px; color:#fff; background-color:#aba59e; -webkit-border-radius:8px; -moz-border-radius:8px; border-radius:8px; margin:6px 0 0 5px; padding:2px 5px; } #subnav ul li a:hover{ background-color:#797979; -webkit-border-radius:20px; -moz-border-radius:20px; border-radius:20px; color:#fff; } </style>
</head> <body> <div id="subnav"> <ul> <li><a href="#"><span id="m">Messages</span><span id="n">100</span></a></li> </ul> </div>
</body> </html>
|
| birdbrain
|
lucy24

msg:4321696 | 7:44 pm on Jun 3, 2011 (gmt 0) |
Quick clarification: do you want the special properties to apply to the entire list item or only to the marker?
|
|