Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2018-03-05 10:13:36

TBC
Member
From: North Carolina, US
Registered: 2014-03-19
Posts: 178
Website

Padding Around Image

I am flummoxed.  In html, I was able to create padding around my images when they appear within text on a page.

Attatched to my template is my custom css file that I copied over from my "old" site.

I have not succeeded either through in-line html or through my css to create padding.

My preference is inline, since I want images to align with the right or left margin and have the padding on the other side.

How should I write, for example, within the <img> tag, padding-right="???" for, say, three pixels?

Sorry to be such a dunce on this. Others may find this useful, too.

My other question on custom css is are there cartain types of entries that should be deleted so they won't conflict with backlight?

Thank you as always,


TBC (The Barefoot Contessa, alias Margo Taussig Pinkerton)
https://www.BCphotoadventures.com/
https://www.BC-FineArtPhotography.com/
perpetual works in progress

Offline

#2 2018-03-05 10:34:33

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Padding Around Image

Backlight contains classes for image alignment. They’re named the same as those in WordPress:
alignleft, alignRight, etc . They have margin built in.


If you want to use inline styling:
<img src=“url...” style=“float:left; margin: 0, 8px, 8px, 0;”/>


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#3 2018-03-05 10:38:02

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Padding Around Image

I didn't see anything in your css that jumped out as problematic. You've got a lot of custom classes, I assume for special situations.

If you want to see all the Backlight css, look at your page source code and click on the url in this line:

<link rel="stylesheet" type="text/css" media="all" href="http://www.BC-FineArtPhotography.com/backlight/publisher/resource.php?template=19&extension=css&name=style" /> 

I copied and pasted this into a text file just to use as a reference.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#4 2018-03-05 10:42:54

TBC
Member
From: North Carolina, US
Registered: 2014-03-19
Posts: 178
Website

Re: Padding Around Image

Excellent, Rod. Just what I was seeking.  I found something like that but could not ferret out the proper format for backlight.

In the order you noted, what do they represent in terms of top bottom left right?

Thanks again,

  TBC


TBC (The Barefoot Contessa, alias Margo Taussig Pinkerton)
https://www.BCphotoadventures.com/
https://www.BC-FineArtPhotography.com/
perpetual works in progress

Offline

#5 2018-03-05 10:49:54

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Padding Around Image

the order is top, right, bottom, left. I think that's what it is for any css like that: borders, padding, margin.

the alignleft class for instance looks like this:

.alignleft {
	float: left;
  margin: 0.25rem 1.5rem 0.25rem 0;
}

It uses rem rather than pixels.

You'd use it on an inline image like this:

<img src="url..." class="alignleft"/>

A lot easier than having to write out all that inline css for every image.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#6 2018-03-05 10:51:43

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Padding Around Image

I've got more here on using inline images. It was written quite awhile ago during the CE3 days but has updates for Backlight
http://ttg-tips-and-tricks.barbeephoto. … lock-text/


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#7 2018-03-05 20:59:10

TBC
Member
From: North Carolina, US
Registered: 2014-03-19
Posts: 178
Website

Re: Padding Around Image

Perfect, and while I did check out your tips-and-tricks, you just clarified some things for me.

Of course, it now works like a charm with a lot less work.

Many thanks, as always, Rod,

  TBC


TBC (The Barefoot Contessa, alias Margo Taussig Pinkerton)
https://www.BCphotoadventures.com/
https://www.BC-FineArtPhotography.com/
perpetual works in progress

Offline

Board footer

Powered by FluxBB