Welcome, Guest
Username Password: Remember me

Adding margin around an image within an article
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Adding margin around an image within an article

Adding margin around an image within an article 15 years, 6 months ago #109

  • bradh
  • OFFLINE
  • Junior Boarder
  • Posts: 38
  • Karma: 0
I added margin:5px to the html code for the image on the following page...

http://notforgotteninternational.org/gardens-in-the-desert.html

I clicked update and refreshed the page. It shows for a split second my change with the appropriate margin, but then immediately reverts back to the previous 0 margin making the text and the image touch.

Any ideas?

I'd like a 5px margin (space) between the paragraph and the picture.
Sincerely,

Rob McBryde
Web Developer
http://www.ivmwebsolutions.com
The topic has been locked.

Adding margin around an image within an article 15 years, 6 months ago #110

  • joomtorial
Hi Rob,

I see what you mean by "reverting back" to no margins.

It seems that the problem here is the extra CSS the caption adds. Somehow the caption you have added makes the set margins (which is 15px on the right side) to disappear.

I assume that if you leave out the captions, there is no problem. But of-course that is no solution if you want a 5px margin WITH captions included.

What you can do is the following:

In your templates folder: Joomla Root > templates/theme110/css/ find the file template.css

Download that file to your desktop.

Open this with your favorite html editor (if you have, DreamWeaver will do, if not available, take Notepad. Mind you Notepad NOT Word!!!) and add the follwoing to that file:

div.img_caption.left {
	margin-top: 0;
	margin-right: 5px;
}
div.img_caption.right {
	margin-top: 0;
	margin-left: 5px;
}


When you have done that, save your file. Before you upload and overwrite the old one, be sure to rename the original on the ftp to for instance: template.css_original

That way, should something go wrong, you can always rename to the original and revert to what it was. Make that natural behaviour before overwriting files, you can always revert that way!
The topic has been locked.

Adding margin around an image within an article 15 years, 6 months ago #112

  • bradh
  • OFFLINE
  • Junior Boarder
  • Posts: 38
  • Karma: 0
I removed the caption option from each photo, and that fixed it.

I didn't try the code you gave me as the above step seemed to solve the issue.

Thanks,

Rob McBryde
Web Developer
http://www.ivmwebsolutions.com
Sincerely,

Rob McBryde
Web Developer
http://www.ivmwebsolutions.com
The topic has been locked.
  • Page:
  • 1
Time to create page: 0.21 seconds

Joomla Video Tutorials by Joomtorial