- This topic is empty.
-
AuthorPosts
-
September 10, 2009 at 10:33 pm #26060
beechertrouble
ParticipantSeptember 11, 2009 at 12:04 am #63792Indubitable Turtle
MemberCan you link to a live example? My first guess is conflicting styles. Do you have padding set on the li or a elements?
The full section(s) of your CSS dealing with lists and anchors would be helpful.
September 11, 2009 at 12:26 am #63794beechertrouble
ParticipantI don’t think there are any conflicts … the overlap seems be be based in the <a> …
here’s a link to the live example:
http://www.beechersmithstackhouse.info/buggs.html
thanks
September 11, 2009 at 12:51 am #63798Indubitable Turtle
MemberI"m going to have to admit that I’m stumped. I’ll look at it again tomorrow after some sleep, though.
September 11, 2009 at 12:41 pm #63822beechertrouble
Participantthanks for trying – i’m still scratching my head too.
September 12, 2009 at 2:42 pm #63930ChetGarrison
MemberTry putting line-height on the actual list item. Right now there aren’t any styles at all. Try something like this:
.navbar ul li {
line-height: .825em;
}Hopefully that’ll help… good luck!
September 12, 2009 at 5:45 pm #63937beechertrouble
Participantnope – no luck.
I set the line-height for both the:
.navbar ul li
and
.navbar ul li ato no avail …. i’ll update the live example.
any other thoughts?
September 12, 2009 at 7:39 pm #63940blue642
MemberIn order to make the "a" tag smaller and avoid the overlap you have to set display to block, and the height to your desired height. But I have a screenshots of some weird handling of this when I get back to my computer. Strange it is.
September 12, 2009 at 9:24 pm #63942ChetGarrison
MemberOk.. I’ve been playing around with it for a bit and then I remembered that explorer has a bug with list items and links. For some reason if you add a border it’ll fix the line-height problem, but then you have the problem with the border. I updated your css, so just swap out the old styles with the ones below. I made the border purple so you can see what I’m talking about. Hopefully that’ll work for you, otherwise I don’t think there is a solution. You might have to live with a border, just make it the same color as the background and no one will ever know :)
Code:.navbar a:link {
color:#484340;
}.navbar a:visited {
color:#484340;
}.navbar a:hover {
color:#fa297d;
padding-left:5px;
}.navbar ul {
width: 150px;
}.navbar ul li {
border: 1px solid #9933ff;
line-height: .8em;
}.navbar ul li a{
text-decoration: none;
display: block;
}September 12, 2009 at 9:57 pm #63943blue642
MemberThat doesn’t work either… here is the screen shot I was talking about.
Notice the dotted outline, that is the clickable area (even though firebug shows that the "a" link is contained within the purple borders.) For some reason the clickable are still overlaps when the anchor link does not extend beyond the borders.
[img]http://img.photobucket.com/albums/v69/blue642/Untitled-1.jpg[/img]
September 13, 2009 at 10:49 am #63961beechertrouble
Participantarg! the mystery continues!
surely there is a solution other than using images …September 21, 2009 at 10:26 am #64510beechertrouble
Participantis there no hope of resolution? surely someone out there has faced this problem before?
… anyone ? …
November 4, 2009 at 12:29 am #66207oldno19
MemberI was going crazy trying to figure this out. It took me 15 minutes to find the right keywords to use in google to even find a thread. After reading this thread, I thought "there HAS to be a way" and while there is probably still a cleaner method, I think I might have a solution for you.
Let’s say your links are set up like this (most importantly, they have a class called "aFix")
Code:In your CSS try doing something like this:
Code:a.aFix {
display:block;
overflow:hidden;
font-size:36px;
height:30px;
margin-top:-10px;
}You’ll end up with your links getting pushed up by 10 pixels, but I think you could compensate by giving a class name to your <li> tags and defining a CSS class that compensates with padding-top or something like that.
Depending on the font you’re using, you’ll want to play with the the last three values for font-size, height and margin-top. Give it a whirl and you’ll see what it’s doing.
I didn’t test this with list items, but it is working with my code where the links are wraped in divs instead of list items.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.