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
VBdotnet2005Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GaryCommented:
Whats your HTML for this?
0
VBdotnet2005Author Commented:
<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>
0
GaryCommented:
Change the padding on .linkStyle{...} to

padding: 0 20px;
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

VBdotnet2005Author Commented:
I tried it and it returned same result
0
GaryCommented:
Can't look the same since the CSS has changed, look at this fiddle

http://jsfiddle.net/GaryC123/3tqs77m4/1/
0
VBdotnet2005Author Commented:
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?
0
GaryCommented:
Add to .linkStyle {...}
display:inline-block

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

 display:inline-block;
 height:50px;
0
VBdotnet2005Author Commented:
Please see image
menu-02.jpg
0
GaryCommented:
Remove the line height from here
#menu {
    font-size: 10pt;
    line-height: 72px;
}


And add it to .linkStyle {...}
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
VBdotnet2005Author Commented:
thank you Gary
0
VBdotnet2005Author Commented:
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
0
GaryCommented:
Add

body{
    margin:0
}
0
VBdotnet2005Author Commented:
excellent. Thanks again
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.