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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:51:52+00:00 2026-06-15T20:51:52+00:00

Fiddle Link I need to display border behind a h1 tag but just not

  • 0

Fiddle Link

I need to display border behind a h1 tag but just not behind the text itself. Also. display the text in center. At the moment you can see “Why us” text is not in center. Or any other work around to do what is needed.

<div  class="lineb"><h1 class="hbord">What <span>we</span> can do</h1><div class="cls"></div></div>

Currently .lineb has grey border-bottom and .hbord has white border-bottom which serves my purpose at the moment but not completely as the “why us” is not centered.

  • 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-15T20:51:53+00:00Added an answer on June 15, 2026 at 8:51 pm

    Try this

    HTML

    <h1 class="one"><span>Heading Number One</span></h1>
    <h1 class="one"><span>Heading Number One</span></h1>​
    

    CSS

     h1 {
        position: relative;
        margin-top: 20px; text-align: center; 
        font-size:25px
      }
    
      h1.one { margin-top: 0; }
    
      h1.one:before {
        content: "";
        display: block;
        border-top: solid 1px black;
        width: 100%;
        height: 1px;
        position: absolute;
        top: 50%;
        z-index: 1;
      }  
      h1.one span {
        background: #fff;
        padding: 0 20px;
        position: relative;
        z-index: 5;
      }​
    

    DEMO

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

Sidebar

Related Questions

I need a code like this. This is an example but it is not
UPDATE1: Updated the JS fiddle link sorry set interval was not working as I
JS Fiddle Link http://jsfiddle.net/Xfvpu/1/ Okay so I have a document with xhtml doctype and
Please refer the fiddle http://jsfiddle.net/HCqsM/5/ Here By clicking the 'click' link for the first
My fiddle link is http://jsfiddle.net/tBYdu/18/ and I don't understand why when I push button
Please check this fiddle: http://jsfiddle.net/cZTjd/1/ I need to make the dropdown list fully clickable.
Here is my fiddle link which has the codes... my problem is that the
I want to recreate the iOS folders effect. Everything works fine, but I need
When the user clicks on a nav link I need the bottom image to
I have unordered list which has bulleted text within. I need to indent the

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.