Closed (fixed)
Project:
ImageField
Version:
6.x-3.2
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Dec 2008 at 14:09 UTC
Updated:
10 Feb 2013 at 19:24 UTC
Jump to comment: Most recent
Comments
Comment #1
sphoenixee commentedI am interested in this as well. It seems to make more sense to have thumbs sorted out horizontally than vertically. Is there some way to do this without Contemplate or editing the tpls?
Comment #2
gallamine commentedI've just been messing with this using CSS, but I can't get it to work (mostly because I'm CSS clueless). I think it has to do with the fact that each image is enclosed by its on < div > tag.
Comment #3
twodA quick test seems to suggest that using float: left in Views on the classes field-item and views-field-title might be a starting point.
Comment #4
Anonymous (not verified) commentedUse the following CSS to make the images go on the same line next to each other:
(Substitute [view-name] for the name of your view)
You'll might also want to either add 'clear: both;' to an element that comes after the images (to stop the floats), or add the class 'clear-block' to one of the divs surrounding the images.
Comment #5
green monkey commentedhi gang I'm trying to do the same --- but not in a view
I've tried below - neither works
div.field_ssimage {
display: inline;
float: left;
overflow: hidden;
margin:10px 10px 10px 10px;
border:1px none #ffffff;
}
div.field-field_ssimage {
display: inline;
float: left;
overflow: hidden;
margin:10px 10px 10px 10px;
border:1px none #ffffff;
}
thanks
Comment #6
Anonymous (not verified) commentedAre you able to post links to the site(s) in question so we can assist you better?
Comment #7
green monkey commentedThank you so very much - but I finally got it ! :-)
took me all day to finally understand that I needed to adress the actual image along wiht the fieldname
The below is working great
div.field-field-ssimage img {
display: inline;
padding: 3px;
background-color: #ccc;
border: 1px solid #ccc;
float: left;
margin: 5px;
text-align: left;
}
note for ref: ssimage is my CCK field or machine = field_ssimage - not sure why it is field-ssimage in CSS and field_ssimage in CCK
Comment #8
blackdog commentedComment #10
dan.crouthamel commentedIs it just me, or did this css image tweak to layout the photos horizontally stop working after 3.0-rc1? :)
Comment #11
Anonymous (not verified) commentedThe ImageField module possibly renamed some classes in the later releases, which would cause the above code to stop working.
Simply change the code to reflect the current class names and it should work again.
Comment #12
dan.crouthamel commentedNo change to class names that I saw. I moved the css override code to filefield.css and it works fine now :)
Comment #14
ElvinJones commentedHi,
im also trying to fix this. Which CCS file did you edit to make this work and where did you find it ?
Comment #15
dan.crouthamel commentedI made the change in filefield.css, which is in the filefield module, not imagefield.
Comment #16
Dreher commentedI cannot make this work and have tried applying the above code to both the filefield.css and imagefield.css. Can anyone help me? I have replaced ssimage with image (my field name)
Thanks.
Comment #17
Dreher commentedComment #18
Dreher commentedComment #19
quicksketchSupport for theming isn't provided in the ImageField queue. You shouldn't be modifying the CSS file that comes with a module, ever. Make you changes in your theme's style.css file, make sure you adjust it to actually match the name of your field.
Comment #20
dan.crouthamel commentedDreher - I'm using the Colourise theme and can place css overrides in a custom.css file. Check if you theme allows for something similar.
Comment #21
bmoorefree commentedWorked like a charm. Thank you, I was on the right track, but you made it so simple. :)
Comment #22
tpainton commentedThank you so much. Spent the last hour trying to find the right selector for this. Firebug was deceptive.
Comment #23
summit commentedHi, Tried it but still can't get horizontal images using views and imageviews.
Couldn't there be an option in imagefield to select horizontal,
if not could someone please show by 1 by 1 steps how to get this working?
Which file to change, what to change there. I am using Ubercart products with imagefield.
Thanks a lot in advance!
Greetings, Martijn
Comment #24
quicksketchSee #19.
Comment #25
Anonymous (not verified) commentedRegardless of how the images are displayed (in a multi-valued imagefield in a node, in a view, etc.), you can easily display them side-by-side with CSS.
Firstly you need to see what the CSS class of the images is. I use Firebug to do this: simply look for a collection of tags (usually divs) that all have the same class name (see attached screenshot for an example). In my example, I can see that all my images have a class of 'field-item', so I can use that to refer to all the images at once. You'll know when you find it as hovering over one of the tags in Firebug will highlight the image on the page.
Once you know the class name, the rest is easy. Simply add some CSS to your theme (the .css file you edit will depend on what theme you're using) as per the following:
The margin can be whatever you like, I just like to space the images out somewhat.
You will also probably want the CSS to be more specific (as the above CSS will affect all field items site-wide).
That's it; find the CSS class of your images, then add some CSS you your theme that floats those images left, easy! :)
Comment #26
coffeenmusic commentedWhen I do this, it works, but my images fall into the comment section and no amount of padding or margin seems to prevent this. Does anyone have an idea of why my images would fall out of the body into the comment section?
Comment #27
coffeenmusic commentedI decided to just go with a view and then filter by the images on the current page. If you want to do the same thing in D7, in views go to contextual filters and select "Content: NID" and then select "provide default value" and then select from the drop down type "Content ID from URL". That will filter to whatever is on the current page. Then I just made the original page images hidden under Content Types - Manage Display - Format (Hidden). Then I added the view as a block to the page. Hope this helps someone else although it is a little off topic.