April 18, 200818 yr I am really still a bit of newbie to CSS but am using it more and more for navigation menus etc. I am putting together a new website just now and have a query regarding the menu - the link below takes you to my sample ...... http://www.swslg.org.uk/test.htm When the 'How to Contact Us' link is rolled over, the rollover colour does not completely fill the last bit of the row, to the right. I would like it to show this colour right to the edge in the same way that the 'Homepage' link rollover colour meets the left hand edge of the table. I thought that using "width=100%" setting in the CSS would have achieved this but obviously I am missing something else. I've tried fiddling around with the Padding options but that hasn't helped. Any advice appreciated please.
April 18, 200818 yr I am really still a bit of newbie to CSS but am using it more and more for navigation menus etc. I am putting together a new website just now and have a query regarding the menu - the link below takes you to my sample ...... http://www.swslg.org.uk/test.htm When the 'How to Contact Us' link is rolled over, the rollover colour does not completely fill the last bit of the row, to the right. I would like it to show this colour right to the edge in the same way that the 'Homepage' link rollover colour meets the left hand edge of the table. I thought that using "width=100%" setting in the CSS would have achieved this but obviously I am missing something else. I've tried fiddling around with the Padding options but that hasn't helped. Any advice appreciated please. Hi fubar, I'm not an expert in CSS (not yet anyway), but here goes.... I don't think you need to have the float in your #navcontainer ul li a style as your are correctly displaying the li elements inline (so that they line up horizontally and not vertically). You might need to add a display:block to your a elements within the ul li to make the hover work correctly. In fact (and I'm guilty of this too), the ul doesn't need to be contained within a div as it's a block level element anyway, you can just use the navlist id that you've given to the ul to reference it and it's sub-elements within the css. Another little tip, try not to use tables for layout, it's not good practice. Other and more knowledgeable members on here may prove me wrong. HTH.
April 18, 200818 yr i had this problem once and fixed it by making each button the same width - therefore if my navbar was 760px wide, i'd divide that by the number of buttons and apply this width to my buttons might be better ways though
April 18, 200818 yr I think the problem is that your li has no set width and so it's the size of the text length? or maybe the ul has a right margin?
Create an account or sign in to comment