Re: CSS help needed

by "Beth Adler" <doglover(at)cgmailbox.com>

 Date:  Sun, 13 Oct 2002 09:17:36 -0700
 To:  "HWG Basics" <hwg-basics(at)hwg.org>
 References:  s8x1s5 hotmail
  todo: View Thread, Original
Hi again,

It took me a little while to figure it out, but I tried Bert's method of
adding a width:

a:link {color: #123456;  font-size: 20pt;  font-family: arial;  text-align:
center;  width: 100%;  background-color: yellow}  in the head section and

<a href="www.link.com">Link</a>  in the body.

I understood what he meant when I suddenly realized it works like tables.
If I put a short word in a td tag and nothing else, even if I have
"align=center", it will still come out at the far left of the screen.  But
if I put "width=100%" in the table tag, it then centers perfectly because
the table itself now takes up the whole screen instead of just a little
piece on the left side.

Unfortunately I'm not sure I can use this because I want to include a
background color around only the link, not around the whole line.  And even
without a background color, if I use "width: 100%" or "width: 783px" to get
the link centered, then the whole line becomes an active link and I only
want the words I put in <a href="">here</a> to be active.  I wish there were
some way of centering just the link itself.  I'm glad I understand it better
now, though, and know that "text-align: center" actually does work with
links, but it looks like I'm still going to have to use either center tags
or something like <div class="center">.

One more question that you guys have mentioned:  What exactly is the
difference between a "block element" and an "inline element"?

Thanks,
Beth
www.teddybearwebdesign.com

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA