|
Convenient web based access to our favorite web design Usenet groups
|
 |
This is Interesting: Free Magazines for Graphics designers and webmasters
| Author |
| Thread |
 |
|
|
|
|
|
 |
 |
|
|
 |
|
|
 |
|
|
 |
 |
Re: line-height in wrapped text |
 |
|
 |
|
|
|
  08-20-04 - 03:38 AM
|
On Thu, 19 Aug 2004 22:46:45 +1000, "Frostillicus"
<frosty@nilspamos.iinet.net.au> wrote:
>I'm having difficulty creating a menu on the left of a web page where each
>link appears to have a 4px padding around the edge but I'm trying to do thi
s
>as a pure unordered list. The "current web page" is just a line item withou
t
>a hyperlink and the stylesheet takes care of everything.
>
>I thought I had everything fine and dandy after doing this: #menu li {
;
>line-height: 22px; } as seen in this example:
>http://marc.fearby.com/line-height.html but as soon as the text wraps to a
>second line, the unsightly effect is a large gap between the two lines.
>I then thought about using padding settings here and there but this just
>didn't work. I tried #menu li a { padding-bottom: 4px; } which is fi
ne for
>list items that contain hyperlinks, but not for ordinary list items. As soo
n
>as I try doing this for ordinary list items, they look fine at the expense
>of those with hyperlinks. Example with inline style here:
>http://marc.fearby.com/padding.html
#menu li { padding-bottom: 4px; } would work fine, except that you
seem to have confused things by specifying a background-color in "#menu
li a" instead of "#menu li". If you want a different background colour
in the cell corresponding to the current page you'll need a class on
that cell, but I suggest that a contrasting foreground colour would be
as good, if not better.
Actually it would probably look better with (a) padding all the way
around, and (b) padding in ems, so it is proportional to the text size.
Soemthing like #menu li { padding: 0.3em; }
--
Stephen Poley
http://www.xs4all.nl/~sbpoley/webmatters/
|
|
|
| [
Post Follow-Up to this message ]
|
|
|
|
|
 |
|
|
 |
 |
Re: line-height in wrapped text |
 |
|
 |
|
|
|
  08-20-04 - 03:38 AM
|
Frostillicus wrote:
> I guess I got carried away in trying to keep the HTML as
> bare-bones as possible, and when I view the page without
> the stylesheet, I like having the current page appear as
> just an ordinary list-item and no hyperlink, but as els has
> suggested, I guess I just gotta put a class in there and
> use a hyperlink to achieve what I want.
No, not a hyperlink, just an <a> element.
And you'll have to check my code to see how exactly it works,
but disabling the styles for my pages, leaves the current menu
item not underlined, as it's not a link.
It just helps to code all menu items the same way.
I did it myself with the menu on my own site, couldn't find
another method to get them divided all evenly.
--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Mr. Big - Green-tinted Sixties Mind
|
|
|
| [
Post Follow-Up to this message ]
|
|
|
|
|
 |
|
|
 |
| All times are GMT. The time now is 04:19 PM. |
 |
|
|
|
|
|  |
|