Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jul 2011
    Posts
    177
    Plugin Contributions
    0

    Default Attribute Label Styling

    I have my attributes set up in a way that only the label is seen and can be selected. It works perfectly however there is one problem when I want to target the elements individually...

    This is a picture of my current attribs layout vs what I want to achieve.




    --
    How can I target the colour attributes individually with CSS? I don't know how to use adjacent selectors for this or if that would even work.

    The webpage is: http://www.pazzle.co.uk/index.php?ma...&products_id=3
    Last edited by Inxie; 12 Oct 2012 at 07:04 AM.

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Attribute Label Styling

    You can set up radiobuttons with image swatches, and set them so that only the images show. I haven't looked at those in a long time so would have to refresh my memory on exactly how, but it is in the option name/option value/attribute controller system in admin.

  3. #3
    Join Date
    Jul 2011
    Posts
    177
    Plugin Contributions
    0

    Default Re: Attribute Label Styling

    Ahh okay, I guess I could do that but to be honest it would be easier for me to just set a background colour with CSS, same outcome right?
    - All I need to know is how to target them separately.

  4. #4
    Join Date
    Jul 2011
    Posts
    177
    Plugin Contributions
    0

    Default Re: Attribute Label Styling

    They have unique ID's, for example 'Blue' has
    Code:
    id="attrib-3-9"
    But when I try
    Code:
    #attrib-3-9 label {background-color:blue;}
    it doesn't work, any idea?

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Attribute Label Styling

    The label is not inside the input, it follows it. Try

    #attrib-3-9+label {background-color: blue;}

  6. #6
    Join Date
    Jul 2011
    Posts
    177
    Plugin Contributions
    0

    Default Re: Attribute Label Styling

    You're too clever, just.. too.. clever..

 

 

Similar Threads

  1. Attribute Label vs. Attribute Drop-Box: Horizontal Alignment
    By peeplead in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 27 Jul 2011, 07:14 PM
  2. Attribute Styling
    By sivivatu in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 11 Jun 2010, 04:52 PM
  3. Hide Attribute Label
    By DigitalGuard in forum General Questions
    Replies: 1
    Last Post: 22 Mar 2010, 04:14 PM
  4. Align Attribute 'Label' and 'Select' items...
    By khopek in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 2 Mar 2009, 09:22 AM
  5. Radio Button Label Attribute
    By gilesletheren in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 15 Aug 2008, 04:02 AM

Posting Permissions

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