Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8256177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:46:28+00:00 2026-06-08T01:46:28+00:00

Everyone, I’m still a beginner at HTML5 and CSS3 I’m having a problem with

  • 0

Everyone, I’m still a beginner at HTML5 and CSS3

I’m having a problem with the navigation bar which causes the bottom paragraph to move slightly when I hover. Any idea how to solve it or what’s happening?

Here is the HTML code:

<!DOCTYPE html>
<html>

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>HTML5, CSS3 and jQuery Navigation menu</title>
<link rel="stylesheet" href="css/nav.css">
<!--[if IE]>
  <script src="html5.js"></script>
<![endif]-->
</head>

<body class="no-js">
  <nav id="topNav">
        <ul>
            <li><a href="#" title="Nav Link 1">HOME</a></li>
           <li><a href="#" title="Nav Link 1">SERVICES</a>
                <ul>
                    <li><a href="#" title="Sub Nav Link 1">Sub Nav Link 1</a></li>
                    <li><a href="#" title="Sub Nav Link 2">Sub Nav Link 2</a></li>
                    <li><a href="#" title="Sub Nav Link 3">Sub Nav Link 3</a></li>
                    <li><a href="#" title="Sub Nav Link 4">Sub Nav Link 4</a></li>
                    <li class="last"><a href="#" title="Sub Nav Link 5">Sub Nav Link 5</a></li>
                </ul>        
              </li>
            <li><a href="#" title="Nav Link 1">ABOUT US</a></li>
            <li class="last"><a href="#" title="Nav Link 1">ENQUITIES</a></li>
        </ul>
  </nav>      
    <p>"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."<p>
  <script src="js/jquery.js"></script>
  <script src="js/modernizr.js"></script>
</body>

</html>

Here is the CSS

/* JS disabled styles */
.no-js nav li:hover ul { display:block; }

/* base nav styles */
nav {
  margin: 0 auto 20px;
  position: relative;
  background-color: #FFFFFF;
  font: 16px Tahoma, Sans-serif;
}
nav ul { padding:0; margin:0; }
nav li { position:relative; float:left; list-style-type:none; }
nav ul:after { content:"."; display:block; height:0; clear:both; visibility:hidden; }

nav ul a:hover { color: #F90; border-bottom: thin; border-bottom-style:solid;}

nav li a {
  display: block;
  padding: 10px 20px;
  color: #333;
  text-decoration: none;
  font-weight: 600;
}
nav li a:focus { outline:none; text-decoration:underline; }
nav li:first-child a { border-left:none; }
nav li.last a { border-right:none; }
nav a span { display:block; float:right; margin-left:5px; }
nav ul ul { display:none; width:110%; position:absolute; left:0; background:#FFFFFF; }
nav ul ul li { float:none; }
nav ul ul a { padding:5px 10px; border-left:none; border-right:none; font-size:14px; }
nav ul ul a:hover { color: #F90; }

/* CSS3 */

.cssgradients nav li:hover { background-image:-moz-linear-gradient(0% 100px 90deg, #999, #222); background-image:-webkit-gradient(linear, 0% 0%, 0% 100%, from(#222), to(#555)); }
.borderradius nav ul ul { -moz-border-radius-bottomleft:4px; -moz-border-radius-bottomright:4px; -webkit-border-bottom-left-radius:4px; -webkit-border-bottom-right-radius:4px; border-bottom-left-radius:4px; border-bottom-right-radius:4px; }
.boxshadow.rgba nav ul ul { background-color:rgba(0,0,0,0.8); -moz-box-shadow:2px 2px 2px rgba(0,0,0,.8); -webkit-box-shadow:2px 2px 2px rgba(0,0,0,.8); box-shadow:2px 2px 2px rgba(0,0,0,.8); }
.rgba nav ul ul li { border-left:1px solid rgba(0,0,0,0.1); border-right:1px solid rgba(0,0,0,0.1); }
.rgba nav ul ul a:hover { background-color:rgba(85,85,85,.9); }
.borderradius.rgba nav ul ul li.last { border-left:1px solid rgba(0,0,0,0.1); border-bottom:1px solid rgba(0,0,0,0.1); -moz-border-radius-bottomleft:4px; -moz-border-radius-bottomright:4px; -webkit-border-bottom-left-radius:4px; -webkit-border-bottom-right-radius:4px; border-bottom-left-radius:4px; border-bottom-right-radius:4px; }
.csstransforms ul a span { -moz-transform:rotate(-180deg);-webkit-transform:rotate(-180deg); }

Actually, I’m doing this using a tutorial on it and trying to convert my own idea.
Anyone, please. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T01:46:30+00:00Added an answer on June 8, 2026 at 1:46 am

    The problem is that you’re adding a 1px border to the bottom of a nav item when you hover over it. You’re doing this on this line:

    nav ul a:hover { color: #F90; border-bottom: thin; border-bottom-style:solid;}
    

    Before hovering, none of the nav items have borders. Upon hovering, a border is created which moves the paragraph down 1px (the size of the border). Thus, you could set a border-bottom for all the nav items. If you don’t want that border to show you can use border-color: transparent.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Everyone, I'm still a beginner at HTML5 and CSS3 I wish to have the
everyone The problem is if there exists two exported components which have the same
everyone! I have sprite moving by action, what have health bar (progress bar). When
everyone I got problem here I need to update a plist data in a
everyone, i found this strange problem ( maybe it is a feature ) this
everyone , I have a problem about the API-- alSourceUnqueueBuffers when I use the
everyone. I have problem replacing existing rows in table with new ones. I use
everyone. I am trying to create a database in which I can store pictures
Everyone managing open-source-software runs into the problem, that with the time the process of
everyone, I would like to connect my galaxy nexus to the eclipse, which allows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.