Skip to main content
January 17, 2011
Question

thumbnails are not centering

  • January 17, 2011
  • 2 replies
  • 577 views

I'm a newbie to dreamweaver and I'm trying to create an auto-advancing portfolio gallery with thumbnails. I've got everything to work and can dupicate the gallery on another portfolio page simply by changing the links in the html.

www.rodrice.net (5 thumbnail gallery)

http://www.rodrice.net/rodrice_advertising.html (8 thumbnail gallery)

My problem is I can't get the thumbnails to auto-center on the page, I can manually adjust the margin in the css but it affects all the thumbnail galleries and it's the not the right solution.

.slideshow-thumbnails * {
    margin: 0;
    padding: 0;
    /* thumbnails positioning from left*/
    left: 15px;
}

This is important since some pages may have 4, 5, 8 thumbnails. I've tried to change the <div> settings to margin-left: auto, margin-right: auto, etc. but nothing works.

Do I need to change one of the other <div> settings or is the solution in the javascript itself?

Any help would be appreciated.

Thanks, Fishing-Rod

This topic has been closed for replies.

2 replies

January 26, 2011

If it's a floating design you get around it when you insert a line element with CSS clear:left/right/both.

Below that the "margin:0 auto;" should work again.

But as far as i see in your source code you might just add the "margin:0 auto;" to the <ul> element containing the thumbnails.

greets,

Herbie

January 17, 2011

Center your thumbnails the same way you centered your container_main

set a width value and then set the container margin to auto

January 17, 2011

I tried that before and the thumbnails still aligned left. The original javascript had the thumbnails align left, so far I've been unable to override that in the css.

Although I'll try again just to make sure.

thanks, Fishing-Rod