First, look at my site : http://terryds.net63.net/test.html

When you hover the navigation anchor text, it will create a 5px border-top..
My question is :

  1. How to make the 5px border top is at the top of the page ? I mean I want to make it in #top-head's border top ...

  2. How to make the border not to take up space ? I mean I don't want to make the text go down when I hover it..

Sorry for my bad skill of English..
Thanks for any answers

Recommended Answers

All 3 Replies

Your site didn't load for me so I could not see the header. But to answer question 2, simply apply a border-top of 5px, but transparent. That way the 5px is already taking space , but you can see it. When you hover, the color will simply change but the elements will not shift.

Maybe this is ok:

ul.nav-ul {
/* I put this */
    position: absolute;
    top: 0px;
    left: 33%;
    list-style: none;
    padding: 0px;
    margin: 0px;
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.