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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:59:52+00:00 2026-06-04T22:59:52+00:00

i have a markup like this: <p>Image caption</p><img /> the p is an inline

  • 0

i have a markup like this:

<p>Image caption</p><img />

the p is an inline block.

I want the caption to overlay the image, rather than pushing the image to the left. Ususally I do this with margin-right -“x”px;, but as I don’t know what width the image caption will have, I can’t use this technique. Are there any good alternatives? (the text has a background color, so I cant’ use block-elemnt)

  • 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-04T22:59:53+00:00Added an answer on June 4, 2026 at 10:59 pm

    The solutions written here were not possible for my site (although technically correct)

    My solution was

    <p>
        <span>Image caption<span>
    </p>
    <img />
    

    and then

    p{
        display:block;
        margin-right -100%;
    }
    

    some extra markup but hopefully it will help someone walking down the same path as I did!

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

Sidebar

Related Questions

I have an href image in this markup. <div class=imgdiv> <a class=imga href=http://destination.com> <img
I have a markup like this: <div> <img /> </div> The div is higher
I have got some markup that looks like this: <div class=button> <span class=image></span> <input
Let's say I have markup like this: <form action=foo> <input name=bar /> <button type=button>Save</button>
I have my markup like this (for argument's sake) <div id=content></div> <div id=layout></div> <div
I have a markup like this: <div class=sentence> <ul title=list 3> <li> <ul title=list
suppose I have a html markup like this: <div> <p> this is the parent
i have a markup which look like this: <h3>Paragraf3-dummytext</h3> <p> <a name=paragraf3> Quisque id
I have a string contaning some html markup, like this: var html = <div>
I have a simple problem with an image going under text, rather than beside

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.