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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:46:46+00:00 2026-05-23T16:46:46+00:00

I have some css problem. here is what I need. No matter how many

  • 0

I have some css problem. here is what I need.

enter image description here

No matter how many words the title have(example: title could be What's new today?, could be hello world)

it always have a background line pass through the whole div, and the word’s background is white. (the word should be text-align:center; and it’s background looks like broken the line)

Here is my code:

<style> 
.ocell {
width:960px;
height:42px;
text-align:center;
padding: 20px 0 20px 0;
}
.wd {
margin: 0 auto;
background-col: white;
margin-left: -10px;
padding: 5px;
}
.line {
position: absolute;
border-bottom: solid 1px #999;
margin-top:-18px;
width: 960px;
}
</style> 
<div class="ocell">
<div class="wd">Title</div>
<div class="line"></div>
</div>

also in http://jsfiddle.net/zApLA/ may be also can use a background-image instead of the line. 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-05-23T16:46:47+00:00Added an answer on May 23, 2026 at 4:46 pm

    This can be achieved by simply using div with border-bottom for the line, and positioning element with text on that line. Fiddle here.

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

Sidebar

Related Questions

I've some CSS problem in Firefox 3. I have several image buttons on my
I had some help today with a need and this is what I have
Simple problem, though apparently not a simple solution. Example here: http://myhideout.eu/new/ Basically the site
I have a UI problem with some CSS that I was hoping to get
I need some help with some CSS coding. I have been trying to get
I've run into a weird IE7 problem.. I have some standard CSS styled buttons
I have some CSS that doesn't behave correctly with IE8. It works fine with
I have some CSS style that does not work in IE and that works
I have written some CSS which targets elements using the parent > child selector.
I have some questions about basic CSS that I was unable to understand or

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.