ericpollard Posted December 29, 2010 Share Posted December 29, 2010 Hello....I have added a bit in the CSS to make the ShareThis button appear on every page in a certain area. It works perfectly fine, but it shows up on the checkout page of the site. The code that calls for the ShareThis button to appear is found in the footer which is found on every single page. Is there a note that I can include in the CSS or in the footer that would keep the ShareThis button from appearing on certain pages? Link to comment Share on other sites More sharing options...
chokk Posted January 3, 2011 Share Posted January 3, 2011 This certainly isn't a CSS issue.What language is your site written in? Link to comment Share on other sites More sharing options...
cousineaug Posted January 6, 2011 Share Posted January 6, 2011 Hello....I have added a bit in the CSS to make the ShareThis button appear on every page in a certain area. It works perfectly fine, but it shows up on the checkout page of the site. The code that calls for the ShareThis button to appear is found in the footer which is found on every single page. Is there a note that I can include in the CSS or in the footer that would keep the ShareThis button from appearing on certain pages?Without a code example, it is hard to see how you might solve your problem. However, with CSS you should be able to place a unique "ID" on the checkout page that pairs with a "CLASS" on the "share this" button so that it is not rendered on the page. The class on the share is the same on all pages and its default function is to render the element the way you desire. When encountered on a page with the specific ID (e.g. checkout) a different set of rules apply.See a text-based example of what I mean onhttp://besidethetrail.ca/demo/disappear.htmlGuy Link to comment Share on other sites More sharing options...
ShadowMage Posted January 6, 2011 Share Posted January 6, 2011 ...with CSS you should be able to place a unique "ID" on the checkout page that pairs with a "CLASS" on the "share this" button so that it is not rendered on the page. The class on the share is the same on all pages and its default function is to render the element the way you desire. When encountered on a page with the specific ID (e.g. checkout) a different set of rules apply.That's not really accurate. An id on an element has absolutely no effect on the styles applied by a class, unless you also provide style declarations for that id.These two elements will display exactly the same with the sample CSS:<div class='red'>This is a red div</div><div id='no_bg' class='red'>This is a red div w/o a background</div>CSS:.red {color: red;border: 2px solid red;background-color: #FFCCCC;}Only after you add:#no_bg {background-color: transparent;}to the CSS will the second div display without the red background.That being said, you can still use an id on the checkout page and provide CSS that will hide it:#shareBtn_checkoutPg {display: none;}You could also use visibility: hidden; if it works better. Link to comment Share on other sites More sharing options...
cousineaug Posted January 6, 2011 Share Posted January 6, 2011 That's not really accurate. An id on an element has absolutely no effect on the styles applied by a class, unless you also provide style declarations for that id.absolutely. I did not go into all the details because the demo page does that so here goes.selective {some other attributes}#faq .selective {display:none;} so when you encounter the selective class one set of attributes is applied. However, when you encounter selective within the id of faq you add to it {display:none;} or as you say {visibility:hidden;}, whichever works best.Guy Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.