Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-11-06 17:01:55

mattmikulla
Member
From: Nashville Tennessee
Registered: 2004-08-25
Posts: 281
Website

How do I use the style attribute with the article image tage?

How do I set a css class to the article image. For example: I want a 1px border around the article images that are displayed.


Art Rogue – Fine Art Photography

Offline

#2 2005-11-06 22:07:55

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: How do I use the style attribute with the article image tage?

depends on your precise requirements – but have a look at upm_img_popper which gives great flexibility with article images …

or you can add css rules inline with the default tag … working from the textbook … you might have <txp:article_image style="border:1px solid red" />

Offline

#3 2005-11-06 23:40:46

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: How do I use the style attribute with the article image tage?

It will depend on the other ids/classes surrounding it, for example, if it appears in your article and your article has a surrounding <code><div class=“post”></code> tag then you could use “.post img {}”. Try to be as precise as you can with the selector so that it doesn’t affect images elsewhere.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#4 2005-11-07 00:00:09

mattmikulla
Member
From: Nashville Tennessee
Registered: 2004-08-25
Posts: 281
Website

Re: How do I use the style attribute with the article image tage?

Thanks all.

I used the surrounding div to target the img tags as you recommended thebombsite. Taken care of.

I just hadn’t seen how to use the style attribute of the article image tag.


Art Rogue – Fine Art Photography

Offline

#5 2005-11-07 00:05:10

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: How do I use the style attribute with the article image tage?

Well I wasn’t sure if you meant you were using the <code><txp:article_image /></code> tag or if it were just an ordinary image tag in an article. If it’s the former then nardo’s suggestion could apply if you preferred. On the other hand I recall that you use “bau_image” and I’m not sure that there is a style attribute for that.

Last edited by thebombsite (2005-11-07 00:07:18)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#6 2005-11-07 20:34:23

Manhog
Member
From: Manchester, UK
Registered: 2004-03-15
Posts: 24

Re: How do I use the style attribute with the article image tage?

On the other hand I recall that you use “bau_image” and I’m not sure that there is a style attribute for that.

bau_article_thumb can do that.

Offline

#7 2005-11-07 22:40:14

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: How do I use the style attribute with the article image tage?

That’s the one Manhog. My memory is slowly goi……… what was I talking about? :)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

Board footer

Powered by FluxBB