[thelist] CSS Question Round 2

Saila, Craig Craig.Saila at bgminteractive.com
Wed Jul 10 09:33:04 CDT 2002


> -----Original Message-----
> From: Hershel Robinson [mailto:hershelr at netvision.net.il]
> Sent: July 10, 2002 6:09 AM

> >You could try setting display: block; and height: 2em;
>
> This last one works, but it leaves an entire blank line

That's likely because the <br /> comes outside the "block" link. Move
the <br /> inside the link:
  <a class="colmenu" href="">About us<br /></a>
  <a class="colmenu" href="">Support<br />ThisOrg.org<br /></a>
  <a class="colmenu" href="">Something Else<br /></a>

and change the height too margin-bottom (won't work in NN4.x) as Brian
suggested (margin doesn't work unless the element is made to be
"block"):
  A.colmenu { display: block; margin: 0.5em;  }

Line-height governs the space between *each* line, height controls  the
size of the block, whereas margin and padding govern the spacing in each
block element.

As for the indent, try using a negative value for "text-indent"
  A.colmenu { margin-left: 0.5em; text-indent: -0.5em; }
(The margin-left value should be the opposite of the text-indent to
negate its effects)

So you're new class would look like this:
  A.colmenu {
    display: block;
    margin: 0 0.5em 0.5em 0; /* shorthand value for margins */
    text-indent: -0.5em; color: #330099;
    font-family: "Arial", "Helvetica", sans-serif;
    font-weight: bold;
    text-decoration: none;
  }

--
Cheers,

Craig Saila
------------------------------------------
craig at saila.com : http://www.saila.com/
------------------------------------------



More information about the thelist mailing list