Hi all

I am using imagecache, cck and imagefield.

I have two imagecache presets, one for the main node article and another which produces a teaser. I have set up everything ok, an respective images show up on the expected pages.

The problem is that on the front page (I'm using page-front.tpl.php) the teaser image sits above the teaser text. I want it to float to the left of the text.

1. How do I do this
2. Is the div surrounding the teaser image produced by CCK or imagecache?

Comments

Patroclas’s picture

If there IS a div on the image you should be able to float it with css? Or are you asking how to define a div for the field?

I find that styling is helped by the contemplate module - it allows you to completely rearrange nodes and teaser display without having to code a tpl.php file.

Brian Tastic’s picture

There is a div surrounding the thumbnail already there, I see this using Firebug. I also see the ugly long class name, but I can't get straight in my head how to style this for the front page only, because the class name for the div also exists on in the full node. so if I override the style of the div in my stylesheet, it will affect the full node image too, which is not what I want.

any ideas?

jgrubb’s picture

Use one of the body classes from the front page to make it only work there. ie -

.front .totally-way-too-long-name-of-your-imagecache-div {
  float:left;
}
Brian Tastic’s picture

Thanks John, that did it.

In honesty, I've been confused for ages about CSS childs, inheritence and psuduo classes and their affects ie

.class

.class1, class2

.class1 .class2

.class1 > class2

maybe it's time to do some swatting-up

venusrising’s picture

I too have been wondering how to get these to line up too. Is there anyway to shorten these crazy long names?
Going to give this a shot, as I could not figure out why my CCK image field floated but landed on top of our taxonomy links in a mess, thanks.

venusrising