Horizontal instead of vertical formatting..

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
wipeout_dude's picture

Hi,

I am trying to create a simple photo gallery that will be exported as a feature and loaded onto a production site.. I have created a content type that has a multi image field for the photos.. When viewing the page the image thumbnails show as a long vertical list which is obviously not ideal..

Is there a quick simple way to get the thumbnails to line up horizontally instead of vertically, preferably without using a view?

Thanks..

Comments

CSS

greta_drupal's picture

Is there a quick simple way to get the thumbnails to line up horizontally instead of vertically, preferably without using a view?

CSS.
display:inline; or float

Thanks for the reply.. I am

wipeout_dude's picture

Thanks for the reply.. I am not very good at coding or themeing so could you explain where/how to implement custom CSS on the field?

Not sure if it makes a difference but I am using Drupal 7 and the Sky theme..

Homework time

greta_drupal's picture

Okay, not to be snide, but this is basic web design 101. Not coding or theming. You really should have a good understanding of that before you move on.

There would be 3 approaches to change the gallery layout, in order of ease:

  1. Modify theme custom stylesheet (or create a new one just for the gallery) -- "skin" the page(s).
  2. Customize the prepackaged View for Gallery or create a new View for Gallery -- you'll be limited to the "filters" that Views includes ...such as table, grid.
  3. Create a custom template (.tpl.php) file for the gallery page(s).

All these approaches will require you to know CSS to modify existing or create new stylesheets.

You might be able to make some changes using a module like Contemplate.

That being said:

  1. If you haven't already done so, run don't walk to download & install Firebug (for Firefox).
  2. View your theme's *.info file to see what the last stylesheet listed is. Usually is something like "local.css" or "styles.css". This is the CSS file to which you add your customization (and overrides).
  3. Open/Edit that stylesheet.
  4. View your web page in Firefox, and use Firebug to highlight the area you are interesting in modifying (the images). Look at the CSS window to see the current styles.
  5. Copy and paste that into your custom stylesheet and modify as you'd like.

NOTICE: For customization of a theme, you really should be using a subtheme.

Understand that this was a very generous post. You really are expected to have done some web design & Drupal homework before jumping. And, when you do, share it with others.

Good luck.

Thank you for the generous

wipeout_dude's picture

Thank you for the generous post and sorry if you find questions that you consider to be simple frustrating.. We all have to start somewhere and thats helped greatly by getting concise answers from people that know, like yourself..

My background is not in web design but rather is server admin.. So where you can easily make a page look pretty I can make the server that runs it fly.. I spend a lot of time answering what is find to be simple questions about setting up different aspects of the server.. What I take from the community in things like this I give back in other topics and contributions.. However, I don't feel there is ever a need to be condescending..

Again, thanks for your reply.. I will now try and solve my layout issue which hopefully doesn't take too long..

It is not an objection to

greta_drupal's picture

It is not an objection to simple questions, only ones where it seems the poster didn't make any effort to figure out first. Knowing how stylesheets are used in Drupal -- or any other website -- is basic knowledge worth knowing early in the game. (Not necessarily be expert in building them, just understanding their role.) I meant no hard feelings -- others aren't nearly as polite about these things. That was genuine constructive criticism.

I actually gave you the benefit of the doubt, as I answered the question with pretty good detail. Yes?

Yes, your answer has a lot

wipeout_dude's picture

Yes, your answer has a lot and I am currently looking at your sub-theme suggestion (which I never knew existed until your post).. :)

In my defence I always try and search for answers before posting, just wasn't searching for the right things I guess..

Anyway, no hard feelings.. Its all cool.. Thanks..