Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-09-27 05:15:49

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

r1853 - image tags

Just updated my test site and something changed in the image tags.

I use this in my sidebar:
<code><p><a href=“http://spreadfirefox.com/”><txp:image id=“13” class=“sidebar” /></a></p></code>

This is in my CSS:
<code>img.sidebar {
border: none;
}</code>

Since the default template was putting a red border on images, I did the above quick fix. But now the red border is back, am I doing something wrong?

Offline

#2 2006-09-27 05:27:32

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: r1853 - image tags

Have you tried a img { border: 0; } or a img.sidebar { border: 0; /*or none*/}?

Last edited by jm (2006-09-27 05:28:24)

Offline

#3 2006-09-27 05:30:06

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: r1853 - image tags

Thanks jm, that did it.

This works: <code>a img { border: none; }</code> or <code>border: 0;</code> but putting <code>a img.sidebar</code> doesn’t, wonder why?

Last edited by hcgtv (2006-09-27 05:35:04)

Offline

#4 2006-09-27 05:33:36

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: r1853 - image tags

Yes – the ids & classes are now applied to the wraptag (for consistency).

Offline

#5 2006-09-27 05:45:41

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: r1853 - image tags

Mary, call me ignorant.

How would you apply a style to an image then, cause on some of my sites I have a class on images for wrapping text around them.

Is this ok?

In the article:
<code><txp:image id=“111” class=“content” /></code>

In the CSS:
<code>img.content {
margin: 6px 6px 0 4px;
padding: 0 6px 0 4px;
float: left;
}</code>

Offline

#6 2006-09-27 06:23:36

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,391
Website GitHub Mastodon

Re: r1853 - image tags

I’m not quite sure what the purpose of wraptag for these kind of element was, anyhow.

From my understanding, wraptag initially was intended as a means for suppressing a wrapping element in case the enclosed element rendered no contents (txp:category_list for instance).

Now it is starting to spread across more txp tags, even those which can be wrapped easily in forms or pages without risking empty wrap elements.

What might be the purpose, consistency set aside? I can’t think of a use case where traditional markup wouldn’t suffice.

Last edited by wet (2006-09-27 06:23:56)

Offline

#7 2006-09-27 06:55:04

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: r1853 - image tags

  • For image and thumbnail, yes. For article_image, no. The other is there because you’d expect it to be.
  • For posted, because it was, apparently, supposed to be there in the first place.
  • Does it matter, really? :)

Offline

#8 2006-09-27 07:31:34

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,391
Website GitHub Mastodon

Re: r1853 - image tags

Not at all. It’s just my curious personality, and then it’s a small candy for the “bloat alarm” trolls.

Offline

#9 2006-09-27 14:08:51

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: r1853 - image tags

I upgraded to r1857 this morning, tested the wrapping of text mentioned in post #5 in this thread and I can’t get it to work.

How would I make it work now with the changes coming in 4.0.4?

Offline

#10 2006-09-28 03:41:08

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: r1853 - image tags

Sorry Bert, missed your post there. Ah, I see, a problem with combining with Textile. You’d apply the class to the wrapping tag, as opposed to the image itself.

article:

p(your-class). <txp:image id="111" />

In the CSS:

.your-class {
margin: 6px 6px 0 4px;
padding: 0 6px 0 4px;
float: left;
}

Offline

#11 2006-09-28 16:10:19

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: r1853 - image tags

Thanks Mary, I’m playing around with your example.

What’s odd is that I had to increase one of the margin properties from 6px to 10px for the image to align. Seems like the image is now it’s own block, where in the past it was sort of sucked into the paragraph.

Last edited by hcgtv (2006-09-28 23:05:00)

Offline

#12 2006-09-28 18:47:17

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: r1853 - image tags

In my excitement to get this working, I left out the user equation.

These changes to the code base basically eliminate the class=”“ and style=”“ attributes of the tag, then shouldn’t the tag builder be updated?

Edit: I think we’re taking a step backwards here, the tag builder is in place, we could ship left and right aligned classes in the default CSS and voila, we empower the user.

When it comes to publishing on the internet, beginners and experts alike are met with a bothersome paradox: word processors and graphics applications allow anyone to do a pretty good job of managing text and images on a personal computer, but to make these available to the worldwide web – a seemingly similar environment of documents and destinations – ease of use vanishes behind sudden requirements for multilingual programming skills, proficiency in computer-based graphic design, and, ultimately, the patience of a saint.

Last edited by hcgtv (2006-09-28 19:00:14)

Offline

Board footer

Powered by FluxBB