Solved

Can't Center in Webkit (Safari/Chrome)

Posted on 2008-10-02
5
822 Views
Last Modified: 2012-05-05
I am using a shopping cart system and there is a table within a div for using star ratings of procucts.
The stars center properly in Firefox and IE, but not in Safari or Chrome (which uses Apple Webkit).
I cannot figure out how to center the stars. I do not have access to the main code of the cart, so this can only be changed with CSS.
Thank you!

Example:
http://www.lowpriceskates.com/lil-angel.aspx

(the stars are on the right above the price and below the product name)
<div class="prod-detail-rating"><table cellpadding="0" cellspacing="0" class="rating-container"><tr><td><img alt="rating" src="/themes/lps1/images/layout/rating-full.gif" /></td><td><img alt="rating" src="/themes/lps1/images/layout/rating-full.gif" /></td><td><img alt="rating" src="/themes/lps1/images/layout/rating-full.gif" /></td><td><img alt="rating" src="/themes/lps1/images/layout/rating-full.gif" /></td><td><img alt="rating" src="/themes/lps1/images/layout/rating-full.gif" /></td></tr></table> </div>

Open in new window

0
Comment
Question by:lowpriceskates
  • 3
  • 2
5 Comments
 
LVL 7

Expert Comment

by:Brad Dobyns, CSM
ID: 22628464
Try this:


/* SAFARI-ONLY POSITIONING */
	/*\*/
	html>body* .rating-container {display:block;}
	/**/

Open in new window

0
 
LVL 7

Accepted Solution

by:
Brad Dobyns, CSM earned 250 total points
ID: 22628536
If that doesn't work, try this:


/* SAFARI-ONLY POSITIONING */
  /*\*/
  html>body*.rating-container {display:inline-block;}
  /**/

Open in new window

0
 

Author Comment

by:lowpriceskates
ID: 22628612
That does not work.
I also tried putting a table in front (table.rating-container) and also using the div name (prod-detail-rating), but none of that did any good.
0
 

Author Closing Comment

by:lowpriceskates
ID: 31502510
Yes, great. Thank you!
0
 
LVL 7

Expert Comment

by:Brad Dobyns, CSM
ID: 22628688
Thanks for the points.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

837 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