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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:53:38+00:00 2026-06-03T13:53:38+00:00

I have a rule to my blog posts that is: p + p {

  • 0

I have a rule to my blog posts that is:

p + p {
text-indent: 1.5em;
}

defined in a div:

.entry-content{
    padding: 2em 3em 4em;
}

and I have some pictures inside the <p> defined like this:

p > img {
    margin-bottom: 0.5em; 
    max-width: 96%; 
    height: auto;
    text-indent: 0em;
} 

what is happening is that: first the resize of the image happens before it have the indent applied, so the right margin of the picture goes out of the defined padding (3em) the size of the indent (1.5em), shouldn’t the image be resized after the indent?

and then even with the text-indent: 0em; the image still follows the rule from the p+p and have indentation.

I solved the problem putting the max-width at 96% instead of 100%, but isn’t there a more logical way of solving this?

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-06-03T13:53:39+00:00Added an answer on June 3, 2026 at 1:53 pm

    The max-width of the image is determined by the width of the p that contains the image. text-indent does not change the width of the p, but it will shift the text/image in, which will cause the image to overhang. Bottom line, you’re seeing the correct behavior.

    You need to modify your html/css to achieve the desired results. Without a more complete example, I can’t offer alternative approaches. You could try position: absolute on the image which will cause the image to go to the upper left corner (ignoring text-indent and padding). If you try this, don’t forget to set position: relative on the containing p.

    p + p {
        text-indent: 1.5em;
        position: relative;
    }
    
    p > img {
        margin-bottom: 0.5em; 
        max-width: 96%; 
        height: auto;
        position: absolute;
        top: 0;
        left: 0;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a rewrite rule that rewrites *.domain.com to www.domain.com (except for blog.domain.com)
I have a rule, that gets up to three parts, separated by a /
I have the following rule defined in the .htaccess file of my webapplication's root
In my .htaccess file I have defined following rule, RewriteRule t/([^.]+)/$ /videos/tag.php?tag=$1 [QSA] The
Assuming that I have this navigation bar <div id = nav> <a class =
I have a simple rewrite rule that writes to an external domain using the
I have a rule that works for one direction but, not the other. A
I have noticed that many blogs use URLs that look like this: http://www.hanselman.com/blog/VirtualCamaraderieAPersistentVideoPortalForTheRemoteWorker.aspx I
I have a rule that will get the extension of every file from the
I have a url that looks like this www.myurl.com/page/blog which works fine with my

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.