• I’m using the Twenty Fourteen theme in my WordPress web site. On one of the pages I want to add images on the left side of the content area (menu sidebar is to the left of that) such that the text wraps around the image.

    I have added two images (near the third and fourth H4 tags, if you take a look at the page) and both of the images are being forced behind the left sidebar due to the theme’s -168px margin-left setting on the image’s parent figure element.

    On the page, if you use an Element Inspector/FireBug/whatever, you’ll see the images nested in figure elements in the code and that it’s way off to the left behind the sidebar. In the Rules viewer, it’s showing a margin-left: -168px on classes “.full-width .site-content .wp-caption.alignleft”

    I added my own class to the images to try to offset the margin by using margin-right: 168px, but it’s not having an effect, presumably because the -168 left margin setting is on an element that is a parent of the image.

    I don’t want to select all figure elements to offset that -168px – I may want that for other figures – I don’t know. WP adds an ID to each image, but I don’t want to have to select each and every image ID (unless that’s the only way), so how do I handle this?

    Thanks for anyone’s help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi Mark, might be best to start off by getting your images to display. Getting lots of 404 errors as your images have not been included correctly. Not sure how you have uploaded these if its from the standard media uploader or if they are part of your theme.

    Lots of errors like this:
    https://glass.glaciallakesmn.com/primerequipment/images/Lenses.JPG Failed to load

    Thread Starter Mark

    (@markyork)

    Well, I think I’ve solved the issue – at least until the CSS I used breaks something else.

    I kind of answered my own question in my original post: I said that the theme sets margin-left to -168px. In my CSS I set margin-left: 0px on the figure element. I’m just hoping setting that on ALL figure elements doesn’t break something elsewhere later on.

    Thread Starter Mark

    (@markyork)

    Sorry about that, Karlos. I’m not getting the error, so it must be because I’m logged in. Per the post I just submitted, I’m hoping I have it solved anyway…

    Yeh the top two images are fixed, good work solving it!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Image added to text is hidden behind side bar’ is closed to new replies.