Image border defaulting to page width? - Forum | JoomShaper
Solved SP Page Builder

Image border defaulting to page width?

Asked by Oliver Johnson 5 years ago Last activity 5 years ago

I have a Joomla article created in PB. I add a single row (no columns) and add an image. I want the image to have a 1px border and to be the full width of the article.

I add the image element, select my image, I don't enter a width (so if I understood correctly the image will be displayed 100% it's size), set the style to border width 1px.

The result is that the border is the same height as the image but it's also considerably wider than the image (gap left and right of the image). I assume this is because the image is smaller than the article width.

So to get the border to fit correctly around the image, I have to keep incrementing the width of the image, guessing at what the width should be, until it matches.

But shouldn't the border always be around the image regardless of the size of the image?

Accepted answer

Marked as the solution
Pavel

Hi.

General Tab - These are add-on content settings.

Style Tab - These are the addon wrapper settings, it is equally for all addons. Border settings apply to the wrapper.

In Image Addon there is no border settings for image (General tab). You can add it only through CSS.
For example:
Add your class in the addon's CSS Class field and use a similar code.

.your-class img {
    border: 1px solid gray;
}

6 more replies

Rashida Rahman Staff

Hi there!

Thanks for your query.

Would you please give me your site URL here to check where you have this issue?

Actually, I need illustration of your problem.

Best Regards

Oliver Johnson Asked this
5 years ago · edited

Hi,

I've found that the problem only occurs in a single column row. If you add a two more column row and add an image to one of the columns the border is the correct size

Oliver Johnson Asked this

Just realised the account details I provided where incorrect. The account should now work.

Oliver Johnson Asked this

This is still happening.
Create a single column row
Add an image
Apply border to image
Border now stretches the full width of the row, not the image

This doesn't happen when you use a row with more than one column. The border then does only go around the image.

Oliver Johnson Asked this

Ahh, okay. Understood. Thank you for letting me know.

Log in to reply.