An example is http://www.crossfix.com/store/kettlebells The title and image are centered but the price, quantity and add to cart are not.

Thank you for your help. I am assuming its in views/uc_products but I fiddled with it with no success.

CommentFileSizeAuthor
#5 centered.png48.31 KBjeremycaldwell

Comments

jeremycaldwell’s picture

Status: Active » Fixed

Here ya go:

.category-grid-products .catalog-grid-sell-price,
.category-grid-products .add-to-cart {
  text-align: center;
}

Add that bit of CSS to your local.css and you should be all set.

rnguyenc’s picture

Eternalistic,

Please tell me where I can send a thank you card to lol. I feel like the Drupal gods hooked me up with my own Drupal guardian angel.

I am once again in your debt. If you can think of anything I can do for you please feel free to ask.

---Randy

jeremycaldwell’s picture

Hey Randy, no problem. Glad that these are some simple fixes on my part ;)

rnguyenc’s picture

did I enter it wrong? It didn't fix the problem yet. I cleared cache and still nothing.

Thanks ahead of time!

/* $Id: local-sample.css,v 1.1 2009/08/19 04:28:52 sociotech Exp $ */

/****************************/
/* LOCAL CSS */
/****************************/

/* Put your custom CSS and CSS overrides in this file and */
/* rename it local.css. By restricting your CSS changes */
/* to local.css, your changes will not be overwritten when */
/* upgrading to a new version of this theme. You can also */
/* use a local-rtl.css file for the equivalent in RTL. */

/* Steps to activate local.css: */
/* 1. Add your custom CSS to this file */
/* 2. Rename this file to local.css */
/* 3. Clear cached data at admin/settings/performance */

/* Paypal not lining up correctly used the following to align it*/

form#uc-paypal-ec-form {
clear: both;
}

.category-grid-products .catalog-grid-sell-price,
.category-grid-products .add-to-cart {
text-align: center;
}

jeremycaldwell’s picture

StatusFileSize
new48.31 KB

What browser are you testing this in? I tested in FireFox and it appears like the attached image.

rnguyenc’s picture

I was testing it in Google Chrome. Looks good in Firefox!

Do you think there is a way I can get it centered on all browsers? I wonder why Chrome does that. Usually if chrome does that then safari would also.

Thanks Eternalistic!

(also what websites have you done I would like to check them out, thanks again for all of your help)

jeremycaldwell’s picture

Each browser has their own cache and that's referred to as "browser cache". So if you view a site in Chrome it stores the CSS files in that browser's cache and when you view it in FireFox it stores the CSS files in that browser's cache. So you have to clear the cache on whatever browser you are using at that time to see changes like this. And I'm referring to the cache in your browser and not the cache on the server which is controlled by the Performance page settings.

Kind of confusing I'm sure but check this out: http://www.wikihow.com/Clear-Your-Browser%27s-Cache

Also you can view my personal portfolio here: www.eternalistic.net

rnguyenc’s picture

Well eternalistic looks like once again you solved all my problems. I didn't know you actually helped designed the theme I'm using. I should do more research into who is helping me next time.

You guys did a great job

Thanks again!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

PeterNL’s picture

Status: Closed (fixed) » Active

Hi I have a similar problem, the image, price and add to cart button are centered after i added your code:

.category-grid-products .catalog-grid-sell-price,
.category-grid-products .add-to-cart {
text-align: center;

But the title is not centered and stays on the left so i added:

.category-grid-products .catalog-grid-title

but the only thing that did is align the price to the left again.

thank you for your help in advance.

Peter.

jeremycaldwell’s picture

Status: Active » Postponed (maintainer needs more info)

Hi PeterNL, do you have a link to your site so we can see it in action? It would be helpful to see the issue and what HTML/CSS is being applied to the product list so we can suggest some CSS that would align things properly for you.

stephthegeek’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)
chandra.drupal’s picture

can we do this in views page at adding field output it as

[title]

?
please reply me