• Resolved karennel

    (@karennel)


    I have a gallery that stretches the width of the page so I don’t want any padding or margin. But for the images that I insert amongst the text on my pages, I need margins so that the text doesn’t flow right up to the image.
    How can I have separate margins for gallery images versus page images?
    Thanks for your help.

Viewing 11 replies - 1 through 11 (of 11 total)
  • It is very difficult to diagnose this type of problem without being able to view the site. If you post a link to your site, showing the pages in question, someone may be able to help you.

    Thread Starter karennel

    (@karennel)

    I have a gallery on my home page: https://180.210.201.130/~baobabph/school/
    This gallery needs to stretch the full width of the page which it does.
    Then I have individual images inserted into text pages such as this one:
    https://180.210.201.130/~baobabph/school/shootouts/
    The images are all right aligned and to the left of the image there should be a space so that the text doesn’t run right up to the image as it does for Shoutout: Orchard Road Night Photography (see line ending in “interesting”). If I add padding to #content img in the style sheet, the home page gallery image then doesn’t stretch the full width of the text above it but my inserted images looks better.
    I’d like to be able to seperately set the style for gallery images and inserted image.
    Thanks for your help.

    I believe you can get what you want by adding this to the end of style.css:

    .et-box > .et-box-content > h2 > a > img { margin-left: 10px !important; }
    Thread Starter karennel

    (@karennel)

    Thanks for your quick response. I tried it but unfortunately the new code hasn’t made any difference.

    If you are using a caching program, be sure to clear the cache in it and your browser.

    Thread Starter karennel

    (@karennel)

    I’ve cleared cash and checked site on different browsers and devices – it’s still not showing the right and bottom border on the home page slideshow images.

    left of the image there should be a space so that the text doesn’t run right up to the image

    Sorry, from your original post, I worked on the LEFT margin between the text and the images on pages other than the Home page. Is that not what you wanted?

    Thread Starter karennel

    (@karennel)

    Sorry for the confusion – I’ve got 2 support tickets out at moment. Yes, I do want a left margin on the images inserted into pages. The new code hasn’t made any difference. The text still runs right up to the images.

    OK – I don’t know what is going on. It works for me.

    It may depend on the font size used in your browser. Try changing the margin-left to a much larger number. That will show if the code is being used.

    For the margins on the Home page, try this:

    .ngg-slideshow {
        height: 452px !important;
        width: 893px !important;
    }

    I see what is happening. When you put the code into your style.css, all greater than signs (>) were changed to & gt; (without the space after the &).

    Edit the code and change them back.

    Thread Starter karennel

    (@karennel)

    GENIUS!!! Thanks so much, both problems are now resolved ??

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘How to create different image margin for page image and gallery image’ is closed to new replies.