Solved

CSS question

Posted on 2011-03-01
4
918 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 200 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 300 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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
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…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

707 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