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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:09:16+00:00 2026-06-06T05:09:16+00:00

Hopefully the good people at Stackoverflow can help me today – I basically drank

  • 0

Hopefully the good people at Stackoverflow can help me today – I basically drank far too much beer last night watching the football and my brain has stopped working.

I’m doing a responsive theme, 3 column layout with H2 tags at the top of each. I need to have a background image filling up the remaining space within the column. I’ve mocked up an image below to demonstrate what I’m on about;

enter image description here

If the background was a block colour I’d probably display the H2 inline and apply the background-colour to that as well, blocking out the image behind it on the containing div.

As you can see though, the mottled background means that technique doesn’t work very well, notice the obvious line above the text;

enter image description here

I’ve been trying all sorts – there must be some clever way of doing this and I hope you can help me!

Thanks for reading!

Robbie.

EDIT Ok, in the end I used a combination of the two answers below, but accepted the answer splitting the header tag into two divs and floating the first left (as I wouldn’t have thought of that). It didn’t work on it’s own, but by giving the left floated div a background the same height as the double lines and tiling it on the x-axis (rather than giving the whole element the background), I was able to cover up the lines under the text without it jarring with the background.

Image:

enter image description here

HTML:

<h2>
<div class="h2-text">Aha!!</div>
<div class="h2-lines">&nbsp;</div>
</h2>

And CSS;

.h2-text {
   padding-right: 5px;
   background: url(../images/footer-lines-overlay.png) repeat-x 0 20px;
   float: left;
}

.h2-lines{
   background: url(../images/footer-h2-lines.png) repeat-x 0 20px;
}

Thanks very much!!

  • 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-06T05:09:18+00:00Added an answer on June 6, 2026 at 5:09 am

    Overshot the Ballmer Peak, I see.

    Anyway, one possible solution is to use floating elements:

    <h2>
        <div style="float: left;">My Header Tag</div>
        <div style="background: whatever;">&nbsp;</div>
    </h2>
    

    Ballmer Peak

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

Sidebar

Related Questions

Hopefully someone here can help me out - basically I have a logging class
Hopefully some smarter DBAs than I can help me find a good solution for
Hopefully somebody can help me out here. I'm working within an embedded ActionScript2 and
Let me explain my problem, and hopefully someone can offer some good advice. I
So hopefully with some CSLA skills out there can help me see a better
I'm not good at scripting but found this site so hopefully some kind people
Can someone provide a good explanation (hopefully with examples) of these 3 most important
I'm wondering if anyone can recommend a good C++ tree implementation, hopefully one that
I've had a good look around for any help with my problem so hopefully
Good morning, all. This is my first question on stackoverflow, so hopefully this isn't

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.