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 8126183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:04:14+00:00 2026-06-06T07:04:14+00:00

I have a floated an h2 a tag with a 6px border-top applied on

  • 0

I have a floated an h2 a tag with a 6px border-top applied on hover. When I hover over the text it pushes the text and elements below it down. How can I stop the border from moving the text and other elements? Thanks!

My CSS:

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
  border: 0;
  font-size: 100%;
  font: inherit;
  margin: 0;
  padding: 0
}

article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
  display: block
}

body {
  line-height: 1
}

ol, ul {
  list-style: none
}

blockquote,
q {
  quotes: none
}

blockquote:before,
blockquote:after,
q:before,
q:after {
  content: none
}

table {
  border-collapse: collapse;
  border-spacing: 0
}

.container {
  width: 960px;
  margin: 0px auto;
}

.logo {
  float: left;
  clear: both;
  margin-top: 30px;
}

body {
  background-image: url("../images/bg.jpg");
  border-top: 8px solid black;
}

h2 a {
  font-family: arial;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 94px;
  color: black;
  float: right;
  margin: 0px;
  padding-top: 20px;
}

h2 a:hover {
  border-top: 6px solid orange;
  padding-top: 0px;
}

.clocknotes {
  width: 437px;
  margin: 0px auto;
  clear: both;
}

.brand-three {
  clear: both;
  margin-top: 85px;
}

.brand-three {
  font-size: 200px;
  line-height: 140px;
  float: left;
  letter-spacing: -20px;
}

.quote {
  clear: both;
  width: 417px;
  float: right;
  text-align: right;
  margin-top: -250px;
  font-size: 26px;
}

.social {
  clear: both;
  float: right;
  margin-top: -80px;
}

.footer {
  clear: both;
  top: 50px;
  position: relative;
}
  • 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-06T07:04:17+00:00Added an answer on June 6, 2026 at 7:04 am

    CSS:

    h2 a:hover {
        border-top: 6px solid orange;
        padding-top:14px;
    
    }
    

    DEMO: http://jsfiddle.net/rathoreahsan/VyRZW/

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

Sidebar

Related Questions

I have floated elements which I can't remove the padding and/or margin, even with
I have a floated span with some text. I have set the overflow to
My understanding is floated elements must have their widths specified, or else unpredictable rendering
How to vertically align the text in a floated div? For example: I have
I have a cleared <hr> tag with margins top and bottom. However, after two
I have a floated div, and a user can change the font size. When
I have an image that is floated to the left that wraps text around
I have floated elements in a DIV which wrap onto the next line. Instead
I have CSS floated elements with predefined width and I want them to transpose
I need to have a floated element after the content/text that's supposed to flow

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.