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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:03:54+00:00 2026-06-12T09:03:54+00:00

I just finished building part of my website using Twitter’s BootStrap, but am looking

  • 0

I just finished building part of my website using Twitter’s BootStrap, but am looking on ways to improve it. This module has an image of known width but unknown height (image height will vary but has fixed width) and has text on top of the image. I originally built this by having an image tag inside a div, then using position:absolute; top:0; to move a layer a text above it.

I don’t like the idea of using position:absolute;. My alternative solution is to treat the image as a background of a div that contains the text. However, by doing so, I have encountered two problems:

  1. I don’t know how to specify the height of the div as this is a
    variable based on the height of the image. The width will always be
    of span4 (300px). Each image will only have a few words at most
    therefore not enough to take up the entire vertical space of the
    div.
  2. As the browser width shrinks, part of the background div gets
    cropped off. This is because BootStrap is trying adjust for
    responsiveness. How would I fix this?

I am completely stumped, and I feel that this alternative solution is not possible without being able to define a definite height. Is there a better alternative?

My code:

<div class="span4 cell">
    This is a placeholder image
</div>

.cell { background: url(http://www.placehold.it/300x200) no-repeat; }

Just to be clear, here is an image of what I am trying to create:
enter image description here

  • 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-12T09:03:55+00:00Added an answer on June 12, 2026 at 9:03 am

    Demo…………………………..

    HI now used to this

    .span4.cell { 
    background:url("http://www.placehold.it/300x200.jpg") no-repeat;
    width:300px;
    height:200px;
     }
    

    Live demo

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

Sidebar

Related Questions

I have just finished building a website for client, instantinteriors.com.au . (Visit this site
I just finished this script it works well, but I am struggling to pass
I just finished looking at this question: https://stackoverflow.com/questions/753122/which-cloud-computing-platform-should-i-choose But, I am not certain what
I just finished building my new COM project (C#, .NET 3.5). This project will
I just finished building my program, but I noticed that vb.net (2010) creates two
I have just finished building my first website with a mobile-first responsive design process
Just finished reading this blog post: http://www.skorks.com/2010/03/an-interview-question-that-prints-out-its-own-source-code-in-ruby/ In it, the author argues the case
I have just finished building my up from bottom (database) over DAO and business
I have just finished making my application and finished building it. And everything is
Just finished my project in Eclipse, using Sphinx for voice recognition. In eclipse 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.