Center a specific widget?

  • lalamums

    #34162

    How do i know where to put the code?

    Just putting that in custom css wont help me much 😛

    So where do i put it? and how do i determine a widget ID?

    thank you for helping me out guys!

    Mod

    Kenneth John Odle

    #34163
    Quote:
    Just putting that in custom css wont help me much 😛

    That is EXACTLY where you want to put that code. Just be sure to refresh your browser cache, and your server cache, if you are using a caching plugin.

    lalamums

    #34164

    text-align: center;

    margin: 0 auto;

    But just putting theese two in custom css could mean anything on my site?! It doesnt tell that its going to apply for a specific widget.

    Is this why i use this..

    #text-14 {

    }

    Telling wich widget it is? then I wonder why it says #text-

    Anonymous

    #34165

    It won’t work if you put the code as is. text-14 need not be the id of your widget as well. You need to find out the ID of the widget which you want to center. Use firebug to find out the widget ID. I guess Ken wrote some tutorials on that.

    We use # to target IDs and . for classes.

    lalamums

    #34166

    #specific widget-14 {

    }

    #text-14 {

    }

    Is there a difference between theese two?

    Anonymous

    #34167

    First one will never work and the second one works only if you have a text widget with ID 14.

    lalamums

    #34169

    Thank you, the part two is exactly what im looking for to learn 🙂

    lalamums

    #34170

    What do you do if it is not a text widget?

    Mod

    Kenneth John Odle

    #34171

    Everything in WordPress gets assigned a unique ID. Using a tool like Firebug will help you to identify the CSS ID you need to target in order to change it.

Viewing 10 posts - 11 through 20 (of 22 total)

  • You must be logged in to reply to this topic.