Priyanka
Priyanka

Reputation: 2832

design issue with the anchor<a> tag

I'm new to the html & css design. I have following design of css-

span.menu a:link, span.menu a:visited
{
   display:block;
    font-weight:bold;
    color:#0000CC;
    background-color:#E8EEFD;
    text-align:center;
    padding:4px;
    text-decoration:none;
    width:70px;
    padding:5px;
    border:5px solid gray;
    margin:0px; 
}

I want to place three link by using tag which should be shown in the following manner-

Calls Customers Venders

and i want to treat them as menu for this they should be placed in horizontal manner. But when i'm running my css design then they placed in the vertical manner like -

calls

customers

vendors

how to do this?

thanks.

Upvotes: 0

Views: 63

Answers (3)

Punit
Punit

Reputation: 1120

add the css properties float:left

Upvotes: 0

shaggy
shaggy

Reputation: 1718

Instead of display: block use float: left.

Upvotes: 0

detaylor
detaylor

Reputation: 7280

Try using display:inline-block if you want to be able to set the width and have them inline.

This won't work with Internet Explorer 6, an alternative would be using float:left. However, this can have complications as the elements will be removed from the normal flow and if there is no other content in the parent element then its height would be reduced to 0. This could be overcome by adding overflow:auto to the parent

Upvotes: 2

Related Questions