New to css so I'm just cutting my teeth on this...

I'm trying to create a list of links that look like buttons.  I don't want 
to create individual
image buttons for each text link element so I thought I would create a list 
and then set
the background of each list element to my image button.  I can center the 
image vertically
and horizontally but I haven't figure out how to do the same with the text. 
I can only
center it horizontally.

Could someone tell me how to do this or, if I'm off on the wrong vector, if 
there is
a better way to do this?  I've included the relavent source below but have 
not included
the image.  Removing the backgound stuff in the "li" and simply replacing it 
with
"border-style: solid" will do for the sample.

Thanks,
Dave.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>

<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
<head>
<title>Some Buttons</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <style type="text/css">

        ul {
          width: 10em;
          list-style:none;
          }

        li {
          height: 2.5em;
          width: 10em;
          background: url("button.png") no-repeat center center;
          background-color: transparent;
          text-align: center;
          }

        a {
            color: #ffffff;
        }
      </style>
</head>

<body>

    <ul>
        <li><a href="#">Button1</a></li>
        <li><a href="#">Button2</a></li>
        <li><a href="#">Button3</a></li>
        <li><a href="#">Button4</a></li>
        <li><a href="#">Button5</a></li>
    </ul>
</body>
</html>






______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to