Forum Moderators: not2easy

Message Too Old, No Replies

positioning a link inside <li>

         

keyplyr

9:02 am on Dec 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm linking text next to list entries. The link text is just a letter inside brackets that make it drop below the line a little. I want this linked text level with the mom-linked text.

<li> blah blah <a href="blah.html">[b][P][/b]</a>

The [P] is what's not level with the "blah blah" - LOL
"margin-bottom:2px;" is not working to raise it. Suggestions?

ul.artist li {
background:transparent;
font:16px/22px times new roman,times roman,serif;
margin-right:0;
}
ul.artist a {
font-size:12px;
margin-left:5px;
[b]margin-bottom:2px;[/b]
}

dcrombie

11:48 am on Dec 13, 2003 (gmt 0)



Can you do something like:

ul.artist li a {
font: inherit;
}

SuzyUK

1:49 pm on Dec 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



it's the vertical alignment of the <a> (inline element) it's defaulting to "baseline"

If you have this:
<ul class="artist">
<li> blap bgah <a href="blah.html">[P]</a></li>
</ul>

instead you will see the [P] is actually aligning itself with the bottom of the "p" & "g" (the descenders).

so if you add vertical-align: middle; to the link CSS that should make it look like you want

Suzy

keyplyr

5:31 pm on Dec 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks Suzy, that's what I was after.