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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:18:32+00:00 2026-06-12T02:18:32+00:00

I must be having an off day, I’m being confused by css. I have

  • 0

I must be having an off day, I’m being confused by css.

I have an image that may or may not exist. With minimal markup I would like to push over an entire block of text so that it doesn’t wrap under the image if it’s too long. Normally I would just float the image and use a set margin, but since the image won’t be there sometimes I want a more flexible solution. Maybe this illustration will help.

enter image description here

I can’t think of any way to do it without extra markup or dynamically using two different classes. Most of what I’ve tried involves floating one or both elements. The p doesn’t have a set length so putting padding-bottom under img is either not enough in some cases or causes unnecessary space if p is too short. Any suggestions?

Edit: Here’s a jsfiddle courtesy of Mark Adams, but it’s pretty much where I’m stuck at.

JSFiddle

  • 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-12T02:18:33+00:00Added an answer on June 12, 2026 at 2:18 am

    Can’t you just make the image float left? Or am I missing something from your question?

    Like this:

    http://jsfiddle.net/cGQ6K/

    edit- or did you want the image to disappear if there’s an overflow on the paragraph or something like that?

    edit2-after adding more text to my paragraph in my jsfiddle I think I know what you mean now…I’ll try to work out a solution

    edit3 – here is the solution you want : http://jsfiddle.net/cGQ6K/7/ It uses a little hack though.

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

Sidebar

Related Questions

ok, I must be having a brain freeze here... I have a ComboBox with
OK, maybe I'm just having an off day. This seems like something a lot
I have a photo gallery that uses images cut off at an odd angle
I'm having trouble using newly installed gems - I think there must be something
I must really be missing something obvious, but I'm having trouble with general use
I know that similar questions have been asked all over the place, but I'm
I must be having some sort of google-block today, because I can't find an
We are having to read text off of an existing VB6 application. So we
I'm having a strange issue with a NSDateFormatter. Off course I'm doing something wrong
I have been having troubles getting my makefiles to work the way I want.

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.