Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-16-2011, 11:13 PM   PM User | #1
sixrfan
Regular Coder

 
Join Date: Aug 2009
Posts: 395
Thanks: 116
Thanked 0 Times in 0 Posts
sixrfan has a little shameless behaviour in the past
Hiding input fields

if you look on this page you'll notice that a bunch of the products have "Add to Cart" buttons next to them. I want to make those display:none. But they each have their own unique ids and no consistent class.

I was hoping with this code, it would hide them all but i guess I don't have the syntax correct:
Code:
.category-page-type input.product-list-control {display:none;}
how do i select all the input fields that are with the .product-list-control and apply my display:none; to them?

please advise. thanks in advance!
sixrfan is offline   Reply With Quote
Old 09-16-2011, 11:21 PM   PM User | #2
Awesomolocity
New to the CF scene

 
Join Date: Sep 2011
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Awesomolocity is an unknown quantity at this point
Code:
.product-list-control input{display: none;}
Awesomolocity is offline   Reply With Quote
Users who have thanked Awesomolocity for this post:
sixrfan (09-17-2011)
Old 09-17-2011, 01:47 AM   PM User | #3
alykins
Senior Coder

 
alykins's Avatar
 
Join Date: Apr 2011
Posts: 1,608
Thanks: 37
Thanked 183 Times in 182 Posts
alykins will become famous soon enough
it seems to me that you were leading towards using js to hide them with their ID's
Quote:
But they each have their own unique ids and no consistent class
did you know you could also do
Code:
getElementByClass("hideMe").style.display='none';

........
<div id="uniqueID" class="hideMe"></div>
__________________

I code C hash-tag .Net
Reference: W3C W3CWiki .Net Lib
Validate: html CSS
Debug: Chrome FireFox IE
alykins is offline   Reply With Quote
Old 09-17-2011, 02:25 AM   PM User | #4
sixrfan
Regular Coder

 
Join Date: Aug 2009
Posts: 395
Thanks: 116
Thanked 0 Times in 0 Posts
sixrfan has a little shameless behaviour in the past
Quote:
Originally Posted by Awesomolocity View Post
Code:
.product-list-control input{display: none;}
just what the doctor ordered. thank you!
sixrfan is offline   Reply With Quote
Reply

Bookmarks

Tags
input

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:46 PM.


Advertisement
Log in to turn off these ads.