Jump to content


Photo
- - - - -

text-align:center; CSS help


Best Answer James B , 17 April 2013 - 01:27 AM

Hi Seena

 

It looks like you're copying the entire css path when inspecting the item. This is only effecting the one item due to - li.post-627 which is the id for that one item. You'll need to apply the css command to the class for all of the prices like in the screenshot below. See where the class is in the html on the left, and then the css which effects the text-align on the right. You can just copy/paste that part.

 

http://screencast.com/t/WyFbWGK5P

Go to the full post


  • Please log in to reply
7 replies to this topic

#1 pspr

pspr

    Super Member

  • Members
  • 114 posts
  • Country: Country Flag

Posted 17 April 2013 - 12:50 AM

the page I am having problem with is 

Please Login or Register to see this Hidden Content

which is the store page of my website.

 

What I am trying to do is text-align:center; all of the prices. The code I am using is 

 

html body.archive div#site.two-sidebar-center div#page.thepage div.page-canvas div#page-main.container-group div#dynamic-content.outline section#productcontent.container div.texture div.content div.content-pad div#pagelines_content.two-sidebar-center div#column-wrap.fix div#column-main.mcolumn div.mcolumn-pad section#productloop.copy div.copy-pad article.product div.hentry-pad div.entry_wrap div.entry_content ul.products li.post-627 a span.price {

text-align:center;

}

 

 

which does work but it only centers one of the prices.

 

I tried playing around with the code but I wasn't able to find a way to center all of them. I was wondering if you guys can help me because my goal is to keep my CSS a minimal and not text align all of the prices individually.

 

Thank You,

 

Seena Khoee



#2 James B

James B

    Advocate

  • Moderators
  • 4985 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 17 April 2013 - 01:27 AM   Best Answer

Hi Seena

 

It looks like you're copying the entire css path when inspecting the item. This is only effecting the one item due to - li.post-627 which is the id for that one item. You'll need to apply the css command to the class for all of the prices like in the screenshot below. See where the class is in the html on the left, and then the css which effects the text-align on the right. You can just copy/paste that part.

 

Please Login or Register to see this Hidden Content



#3 pspr

pspr

    Super Member

  • Members
  • 114 posts
  • Country: Country Flag

Posted 17 April 2013 - 02:24 AM

perfect james. And last question. James how can i hide the select option under the price. I did display none but it shows the select option then it hides it.. 



#4 James B

James B

    Advocate

  • Moderators
  • 4985 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 17 April 2013 - 03:15 AM

You must have managed to hide this, I can't see it on the site under the price.



#5 pspr

pspr

    Super Member

  • Members
  • 114 posts
  • Country: Country Flag

Posted 17 April 2013 - 03:17 AM

Oh yeah... I did hide it... bud i dont like the way I did it. Because when I load the page, you see the buttons for a second then it gets hidden. Is there anyway I can remove that option. from WooCommerce. Or from CSS the code i'm using is

 

 

 
.woocommerce #page .btn {
display:none;
}

 

 

Thanks James



#6 James B

James B

    Advocate

  • Moderators
  • 4985 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 17 April 2013 - 03:27 AM

Ah i see what you mean, I think that's displaying like that for a second as it's related to the woocommerce js script which I think loads once the page has fully loaded. There's probably a way to edit that, but you'd need to get the product developer to advise how that would be done.

 

If you drop a post here -

Please Login or Register to see this Hidden Content

selecting woo commerce from the drop down list that will alert the developer to your question.



#7 pspr

pspr

    Super Member

  • Members
  • 114 posts
  • Country: Country Flag

Posted 17 April 2013 - 04:13 AM

Thanks James appreciate it. How long do you think it will be for them to reply?



#8 James B

James B

    Advocate

  • Moderators
  • 4985 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 17 April 2013 - 04:40 AM

There's no guaranteed times unfortunately, as each developer is based in a different location internationally, so it depends what time it is where they are etc. But it will go into a queue and they'll be able to go through and answer as soon as possible.