• I have been browsing this forum and can’t find a working solution.
    I’m trying to use CSS/HTML on my wordpress site to adjust the width of ONLY the pink bars on this screen, using them as “headers”. I want it to span from white side to white side, overriding the white margin to the right and left of them.

    How would I do that?

Viewing 8 replies - 1 through 8 (of 8 total)
  • We’d need to see what you are talking about – can you post a link to your site?

    Thread Starter ohmylight

    (@ohmylight)

    Not sure if this is the right way, but the css would go like this:

    .headers {
    	padding: 5px 25px;
    	margin: 0 -25px;
    	background: #f0aac6;
    	color: #fff;
    }

    And then on the post:
    <div class="headers">Your text</div>

    If anyone knows of better way, please correct me.

    Thread Starter ohmylight

    (@ohmylight)

    However the pink bars are not “headers” – they’re jpegs inserted into the post as an image.

    Oh yeah. Stupid me, completely ignored the title of the post…
    Sorry then. No clue how you could do that. But if you want just this kind of image like a title, and not an actually picture, you could try making it into a text tho. That’d be much easier.

    Try putting this in Appearance > Edit CSS (provided by Jetpack you already installed)

    .pp-img-protect-aligncenter {
    	background: #f0aac6;
    	margin: 0 -25px !important;
    	padding: 5px 25px;
    }

    The !important is needed just because there is something else using it.

    Thread Starter ohmylight

    (@ohmylight)

    Will the above CSS code work on ALL images or just the images on the “about” page? I’m working with another headshot on this page which I do not want alined against the margin. I also want to apply this to future “header/images” on a few other pages.

    I found a spot for CSS specific to each image when you edit the imbedded image and click on “advanced” at the top… is that a way to alter images individually?

    It’d work for any image within a div with that class, and that image must be in the same pink. That class name is not WP standard, I’m not sure how that setup, might be theme function, plugin.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Making an image full post width’ is closed to new replies.