?
Solved

CSS question

Posted on 2011-03-01
4
Medium Priority
?
921 Views
Last Modified: 2012-08-14
I have this page:
http://tinyurl.com/4e99682

There are three thumbnails under the main image. I am trying to center those thumbnails.

When I remove this code from the css:
div.category_view_product a img.product_image{
  float: left;
  margin-right: 6px;
  }


and replace it with margin:0 auto; the images do not center.

I don't want to manually pad the images because sometimes there will be more then three images. Any idea how to fix this?
0
Comment
Question by:lvollmer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 13

Assisted Solution

by:darren-w-
darren-w- earned 800 total points
ID: 35012861
Can't see the source on page, but what I would normally do is th wrap the items in a new div and float it using your code
<div id='cen'>{image code here}
</div>

CSS:
#cen{margin:0 auto;}

Open in new window

0
 

Author Comment

by:lvollmer
ID: 35013310
that didn't seem to work. Here is what I did:

  .wpcart_gallery {
margin: 0 auto;  }

div.wpcart_gallery img{
      
      margin-top:3px;
      margin-left:3px;
      margin-right:3px;
      margin-bottom:3px;
      border:1px solid #9A9CCD;
}
 




<div style="background-color:#EEE8E0; border:1px solid #D5D3D0; padding:5px;">
		<div class='wpcart_gallery'><a href='http://s111576.gridserver.com/wp-content/uploads/wpsc/product_images/01.Tank.Front.Nude.0009.jpg' rel='enlargeimage' rev='targetdiv:loadarea' rel="wp-prettyPhoto[g142]"><img src='index.php?image_id=152&amp;width=300&amp;height=300' alt='' title='' width='69' height='69' /></a><a href='http://s111576.gridserver.com/wp-content/uploads/wpsc/product_images/02.Tank.Back.Nude.0052.jpg' rel='enlargeimage' rev='targetdiv:loadarea' rel="wp-prettyPhoto[g142]"><img src='index.php?image_id=153&amp;width=300&amp;height=300' alt='' title='' width='69' height='69' /></a><a href='http://s111576.gridserver.com/wp-content/uploads/wpsc/product_images/03.Tank.Side.Nude.0018.jpg' rel='enlargeimage' rev='targetdiv:loadarea' rel="wp-prettyPhoto[g142]"><img src='index.php?image_id=154&amp;width=300&amp;height=300' alt='' title='' width='69' height='69' /></a></div>		</div>

Open in new window

0
 
LVL 16

Accepted Solution

by:
SSupreme earned 1200 total points
ID: 35013708
.wpcart_gallery {
margin: 0 auto;  
width:175px;}
0
 

Author Closing Comment

by:lvollmer
ID: 35013732
thanks to both
0

Featured Post

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question