• Resolved razorpig

    (@mjtilbury)


    Hi all, I’m just getting my head around using Firebug, but how do I know which div/selector is the correct one? This is a good example – on my home page I want the small image slider to float on the right hand side :

    http://www.centrepiecedesign.com

    …but I can’t tell which element to apply the float property to.

    Is it..

    #metaslider metaslider-nivo metaslider-566 ml-slider or..
    #metaslider_container_566 or..
    slider-wrapper theme-default or..
    metaslider_566.nivoSlider

    How do I tell? I’ve tried so many combinations but so far none have worked. If I’m honest…I’m not entirely sure when I should use ‘#’ or ‘.’ either, but I usually just keep trying until it works 😉

    Please help

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi Mandody,

    “.” targets a class (can apply to many elements on the page)
    “#” targets an ID (should only apply to a single element)

    Ideally you want to target the outer most element you can.

    Your CSS edit is almost right, change:

    .metaslider {
    float: left;
    }

    to

    .metaslider {
    float: right;
    }

    Regards,
    Tom – Meta Slider Author

    Thread Starter razorpig

    (@mjtilbury)

    Thanks Tom 🙂 much appreciated. Will this just alter the float property of the slider on my home page? I have other sliders on the site but I want these to stay as they are…

    Thread Starter razorpig

    (@mjtilbury)

    OK… I tried it and it works perfectly 🙂 Maybe because my other sliders are the exact content width? So I’d still be keen to know if this effects all sliders on the site – and if so, how would I select just this slider?

    Many thanks again. And thanks for clarifying the ‘#’ vs ‘.’ issue 🙂

    Thread Starter razorpig

    (@mjtilbury)

    I’ve added a margin now but as I suspected it has effected all the other sliders on my site. Just need to apply these properties the home page slider…

    Thread Starter razorpig

    (@mjtilbury)

    Got it! 🙂 This is what I needed :

    .metaslider.metaslider-nivo.metaslider-566.ml-slider {
    float: right;
    }

    But BIG thanks Tom…you set me on the right track 😉

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Which DIV/selector?’ is closed to new replies.