Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Aug 2009
    Posts
    407
    Thanks
    119
    Thanked 0 Times in 0 Posts

    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!

  • #2
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    4
    Thanks
    0
    Thanked 1 Time in 1 Post
    Code:
    .product-list-control input{display: none;}

  • Users who have thanked Awesomolocity for this post:

    sixrfan (09-17-2011)

  • #3
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,740
    Thanks
    41
    Thanked 191 Times in 190 Posts
    it seems to me that you were leading towards using js to hide them with their ID's
    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

  • #4
    Regular Coder
    Join Date
    Aug 2009
    Posts
    407
    Thanks
    119
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Awesomolocity View Post
    Code:
    .product-list-control input{display: none;}
    just what the doctor ordered. thank you!


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •