Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By Joe Huggans on
I am displaying portrait and landscape photos in a slideshow, the landscape photos are fine, but the portrait ones align over to the left. I have tried using css but I'm pretty sure this is javascript?
I am a noob to javascript so need some assistance if anyone can help, or point me in the right direction I will try figure this out myself. Maybe if someone could confirm that this is infact a javascript doing this
An example of what I mean is here
http://www.zoemutter.com/photography/portraits
Gracias
Comments
Try adding this to the bottom
Try adding this to the bottom of your style.css file. You can also override the picture border-style:none if you want here.
A list of some of the Drupal sites I have designed and/or developed can be viewed at motioncity.com
Nope its still the same.. :(
Nope its still the same.. :(
Firebug
Well it is not getting picked up so it's not showing on the page. Are you familiar with Firebug? It allows you to "peak" at the CSS used by every element on the page. Worth watching a video or two if CSS is giving you pains.
I don't usually recommend hacking the module's CSS because when you update the module you'll over-write the CSS changes. However, just to get it to work you could replace what's around line 121 of the file at: sites/all/modules/views/css/views.css with the above.
A list of some of the Drupal sites I have designed and/or developed can be viewed at motioncity.com
Yeah that's not working
Yeah that's not working either, I have replaced the code you mentioned but still it aligns left.
Hmmm. :|
hmm I'm not helping then
I see it in there now. Weird that it is not working. I'm sure some uber-Themer could take a look at that and tell you exactly what's wrong. Me? I just work my way up the CSS tree and try and put that code in different divs. Maybe I'd try .views_slideshow_singleframe_teaser_section next. Then maybe #views_slideshow_singleframe_div_portrait_page-block_1_0
A list of some of the Drupal sites I have designed and/or developed can be viewed at motioncity.com
Have you managed to align
Have you managed to align center using firebug?
found a way to do this
found a way to do this !
.views_slideshow_singleframe_slide {
left:50% !important;
margin-left:-465px;/**Half of the total desired width of the div**/
text-align:center;
width:930px !important;/**The total desired width of the div**/
}
Thanks joeuk - I got this
Thanks joeuk - I got this going but didn't setting left margin that way pushed the image left. I changed the left margin to 0 and it worked. My slideshow view is inserted in a panel page, and the CSS is just added in the general settings for that page. Cheers.
Could I ask someone to take a
Could I ask someone to take a look at what I've done and help me understand what I've done incorrectly?
I'm trying to center my images horizontally. I've created a custom theme in sites/all/themes, including a css file that looks like this:
Images are still left-justified. Here's the slideshow:
http://www.musclecarresearch.com/product-slideshow
I'm trying to see what's what with Firebug, but I'm still a noob with it and I don't see my stylesheet listed when viewing the page source.
I got this to work, but I'd
I got this to work, but I'd like to understand if there's another way to do it without modifying any of the core theme files. Here's what I did:
I had previously tried to add the style to the end of the Garland style.css file. For some reason that didn't work.
So - its there a way to do this without modifying garland.info or Garland's style.css files?
you edit the wrong css file,
you edit the wrong css file, it should be in views_slideshows.css not in your themes css
it works..
sah62 post, give the solution, but it must be place in views_slideshows.css not in your themes css
ie:
i use singleframe then i put sah62 edited line in:
sites\all\modules\views_slideshow\contrib\views_slideshow_singleframe\views_slideshows.css
yes it half works for me...
Meaning all the images align center correctly except the first one in the list.
Hi, How about in
Hi, How about in views_slideshow 3.dev?
greetings, Martijn
Ok I found a Solution....
I forced the content to be displayed in a table by formatting the output of one of the fields and centered everything in the table. It all works... still don't understand why the center tag do not work for the first content.
HOW TO CENTER IMAGES
Hello,
it's uses basically a how center images , and it can take a server timestamp to start with. The css can also be easily modified to one's own likings.
http://www.phphunt.com/111/how-to-center-images
This solution work's well!
joeuk solution work's well, but if we have only 1 image, the parent div has no css from the views slideshow module.
I found the solution by creating a template of "views-view-fields--(our view name).tpl.php" in the theme, and warping the $field->content; with a div.
my example:
.....
....
This worked for me.
This worked for me.
Center and use whole block
hI have recently installed a slideshow and like others its justified tot the left. As a newbiw to drupal and css does this code views_slideshow_cycle_main_slider-block.views_slideshow_cycle_main.views_slideshow_main.viewsSlideshowCycle-processed a standard name i.e. Its dot nothing to do what you called your slideshow? What file do you add this code to? Is there no other way to do this without coding?
Also, I notice a dotted line when you hover over the slidehsow, how can use change the images to fill up the entire dotted block?
Thanks
=-=
CSS is added to your custom.css file in your subtheme.
Separate questions deserve separate threads. As such, I've only responded to the question that pertains to this thread.