| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Join Date: May 2007
Posts: 4,302
|
help with simple nav <ul> thing
working on this simple site... trying to make a nice flexible single layer navigation down the left hand side. at the moment the arrow graphics are block elements and are stretching to the width of the div what is the best way of setting them so they stick to the width of the text? floating does the trick but i need the clear the floats - which feels like a bit of a bodge too far. cheers alls link: The Good Academy Last edited by Do Gooder : 28-04-2008 at 09:52. |
|
|
|
|
|
#7 (permalink) |
|
i'm done, son
Join Date: Jan 2005
Posts: 12,262
|
I may not be understanding what you're asking, but... HTML Code:
Code:
|
|
|
|
#9 (permalink) |
|
Join Date: May 2007
Posts: 4,302
|
- yup. as herkalees said.. but anywayz that is neater than my code for a start. cheers. i am going to do a bit of research and get back on this one. i might be digging myself a bit of a CSS hole. the rollover graphics are doing my cold ridden brain in. |
|
|
|
#11 (permalink) |
|
Join Date: May 2007
Posts: 4,302
|
Been working on this site again tonight. The Good Academy A wee question about the nav links. Do i need to repeat all the styles for the: ul a ul a:hover ul a:visited ul a:active or do i style the 'ul a' and those styles they carry on to the next link state and i only need to mark the changes for the rollovers? Hope this question makes sense.. i'm a bit tired. Richard 'Dumbass' Rogers |
|
|
|
#14 (permalink) |
|
Join Date: May 2007
Posts: 4,302
|
Why thank you. It's been hard work and a serious learning curve.. but we are on the way to being a proper charity... and bizarrely, I am now on the advisory board for the Glasgow Met College. Makes me feel very grown up. We are about to start nagging glasgow agencies for student mentors... I will ad you to my mithering list. We are well pleased that Hyphen are on board! |
|
|
|
#15 (permalink) |
|
Registered User
Join Date: Mar 2008
Location: London
Posts: 12
|
Try it like this: ul li { display: block; overflow: hidden; margin-bottom: 6px; } ul a { display: block; float: left; text-decoration: none; text-transform: uppercase; color: #FFFFFF; padding: 10px 30px 10px 10px; background-image: url(../academy-images/arrow-black.gif); background-repeat: no-repeat; background-position: right center; } ul a:hover { padding-right: 40px; } You should be able to lose those BR's then. Also, I would include the id of the containing div i.e. #nav ul a {...} otherwise if you use a list elsewhere it'll end up being styled like your navigation. |
|
![]() |