Link to home
Start Free TrialLog in
Avatar of VBdotnet2005
VBdotnet2005Flag for United States of America

asked on

Html - link

Please see attachment. How can I get the result like image #2. When hover a link, I want "Home" link (and other) to be in the center and also I want to be able to adjust the width and height?



<head>
<style>
#menu {
    height:61px;
    background-color:#D2691E;
    font-size:10pt;
    line-height:72px;
    
    
}
#menu img {
    float:left;
    width:150px;
    height:60px;
    padding-right:18px;
}
.linkStyle
        {
         color: #FFFFFF;
         text-decoration: none;
         font-size:small;
         font-family: "Verdana";
         padding-right: 40px;
         color: #dde4ec;         
        }

a:hover
{
    background-color: #bfcbd6;
    color: #465c71;
    text-decoration: none; 
}

.clearFloat {
clear:both;
}

Open in new window

menu-01.jpg
Avatar of Gary
Gary
Flag of Ireland image

Whats your HTML for this?
Avatar of VBdotnet2005

ASKER

<body>
    <div id="menu">
        <img src="temp.gif" />
        <a href="http://mysite/home.html" class="linkStyle">Home</a>
        <a href="http://mysite/documents.html" class="linkStyle">Documents</a>
        <a href="http://mysite/purchased.html" class="linkStyle">Purchased</a>
        <a href="http://mysite/Ordered_by.html"class="linkStyle">Orderedby</a>
        <a href="http://mysite/internal_sales.html" class="linkStyle">Internal Sales</a>
        <a href="http://mysite/Customername.html" class="linkStyle">Customer Name</a>
       
    </div>
    <div>
        Content goes here
    </div>
</body>
Change the padding on .linkStyle{...} to

padding: 0 20px;
I tried it and it returned same result
Can't look the same since the CSS has changed, look at this fiddle

http://jsfiddle.net/GaryC123/3tqs77m4/1/
My bad. I had to close and open my Visual Studio 2010 pro to see the change. How can I control the width and height of it?
Add to .linkStyle {...}
display:inline-block

then you can add height and width
I tried this and it did not stay in the center.

 display:inline-block;
 height:50px;
Please see image
menu-02.jpg
ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thank you Gary
I hope you don mind this. How can I remove this white gap? I want to move the menu all the way to the top.
menu-03.jpg
Add

body{
    margin:0
}
excellent. Thanks again