By frychiko on
I've installed the Image module and there's a feature to attach images to your content.
The problem is I don't know how to customise how it is displayed. Attached images always seem to be floated to the right and not cleared. I would like to center the image and clear the image.
cheers,
Frychiko
Comments
You could accomplish this
You could accomplish this with CSS in your theme:
Just view the source to find out the image's class and add that to the bottom of style.css.
Awesome thanks for that
Awesome thanks for that tmallen.
Is this supposed to work?
Is this supposed to work? In which browsers? At least inside a View this isn't working at all. The image can't be even right aligned. I'm seeing this code:
With
.views-field-image-attach-images span.field-content a img.imageI can target the attached image, but whatever I put in the CSS, it doesn't show up in the view (but in Firebug/Dragonfly!)Firebug gives me this:
Result: left aligned image without red background (Drupal 6, Views 2).
I can put
into
.views-field-image-attach-images,.views-field-image-attach-images span.field-content,.views-field-image-attach-images span.field-content a img, or all of them - nothing is being centred in the view.It starts to get interesting, when I put the container in an inline-block and the image in a table-cell:
This right aligns the image, at least in Opera and Chromium, but still nothing is being centred.
It's getting better, as soon as I put the container in a table:
This centres the field in the view in Opera and Chromium; the question is, if this would be the correct approach, and what other browsers are saying to
display: table.Greetings, -asb