CSS help in menu navigation.

Page: 1


Ambassador
28 posts
I am still trying to get to grips with CSS instead of using tables. I think I am slowly getting there :rolleyes: I have 2 questions:
1: If you could check out dev.motormadness.net you will find that my nav blocks have spaces in between them. I cannot see how it is doing this and
2: Been using text-indent: -9999px; to hide the text menu and when you click the item you get a rectangle highlight that goes off the page. I have checked other sites and they do not get this bar.

I am clearly missing something and your help would be much appreciated.

Thank you for your time.
Thierry

Ambassador
665 posts
Thierry Seal wrote:
1: If you could check out dev.motormadness.net you will find that my nav blocks have spaces in between them. I cannot see how it is doing this and


This code fixes it. Notice the added float.
#menu ul li {
display:inline-block;
float: left;
}



Thierry Seal wrote:
2: ... when you click the item you get a rectangle highlight that goes off the page.


Sorry, I can't reproduce this with any of my browsers.

Senior Advisor
3,833 posts
I'm attaching an image of what I assume must be this rectangle. I had something similar once and found out that I had some nested code in a wrong sequence. I haven't found the same to be the case here, though.

You will also see, that on my screen the last menu button drops down to the next line. Ha en riktig god dag!
Inger, Norway
http://www.nettstedet.net/
http://www.kandoraservice.de/english/enindex.html
http://www.johnsflats.com

Senior Advisor
3,833 posts
Have to add that the screen shot I posted above is showing what I see when using FF latest version. When I use IE, also latest, I don't see the rectangle, but the last button is still on the next line. Ha en riktig god dag!
Inger, Norway
http://www.nettstedet.net/
http://www.kandoraservice.de/english/enindex.html
http://www.johnsflats.com

Ambassador
28 posts
Cary wrote:
Thierry Seal wrote:
1: If you could check out dev.motormadness.net you will find that my nav blocks have spaces in between them. I cannot see how it is doing this and


This code fixes it. Notice the added float.
#menu ul li {
display:inline-block;
float: left;
}



Thierry Seal wrote:
2: ... when you click the item you get a rectangle highlight that goes off the page.


Sorry, I can't reproduce this with any of my browsers.


Cary,
Many thanks the float worked a treat for my menu :)

Ambassador
28 posts
Inger Eik wrote:
I'm attaching an image of what I assume must be this rectangle. I had something similar once and found out that I had some nested code in a wrong sequence. I haven't found the same to be the case here, though.

You will also see, that on my screen the last menu button drops down to the next line.


The image showing the rectangle is what I have when testing with Safari, IE8, FF3 and Opera - puzzling?

Thank you all for taking the time to help.

Ambassador
665 posts
Ah, my windows weren't wide enough to show that when I was checking. Now that I've seen it I can only say I don't know how you can fix the outline without removing it altogether.

#menu ul li a {
display:block;
text-indent:-9999px;
outline: none;
}

Ambassador
28 posts
Cary wrote:
Ah, my windows weren't wide enough to show that when I was checking. Now that I've seen it I can only say I don't know how you can fix the outline without removing it altogether.

#menu ul li a {
display:block;
text-indent:-9999px;
outline: none;
}


Cary, you are a genius. This has solved the issue and I am very much grateful for your time and effort in helping me out.
Kind regards
Thierry

Please Login to Reply

Download Our Software:

... and don't forget about our Free Software