Center accordion buttons?
-
Is there a way to better center the accordion buttons on the page https://mountbakerclubsite.wordpress.com/calendar/? They are a bit to the left of dead center compared to the calendar and the footer.
The blog I need help with is: (visible only to logged in users)
-
If you change the line in your existing CSS to the following it should work:
article.accordion section { margin: 0 auto .5em; } -
Hi there, add left and right margin declarations to your #acc1… rule and set them to “auto” like this.
#acc1, #acc2, #acc3, #acc4, #acc5, #acc6, #acc7 { margin-left: auto; margin-right: auto; text-align: center; } -
Thanks, but that didn’t seem to change the centering. The left and right justify to seem to work, but not a good centering. Curious
Thanks again
Steve
-
Hi Steve, I just went into your Customizer and added the margin left/right auto to your custom CSS and the three buttons below the calendar are center aligned.
Can you give it another try and then leave the code in so that I can take a look at it if it doesn’t work?
-
Thanks for your help. I don’t see any change from the original (even after deleting browser caches – Safari 9.1.2 ). This is what I see:
https://dl.dropboxusercontent.com/u/610147/MBC%20Calendar%20Centered.tiff
The accordion buttons are shifted just a bit to left of center.
Thanks agin
-
Adding the original CSS I posted still works for me. I’ve tested in FireFox and the same version of Safari as you use (via the dev tools). Can you add that code back in and save the changes, then I’ll take another look to see if it’s different when applied in your stylesheet.
-
-
I don’t see it saved in the custom CSS file your site is loading. Can you try copying it in again at the end of your existing styles:
article.accordion section { margin: 0 auto .5em; }Either that or just adjust your second rule so the middle value for the margin is auto.
-
Luke,
I had given up and went back to the original code. With your message, I tried again and this time it worked! Not sure why, maybe I pasted it in the wrong place at first.
Anyway, thanks bunches, you are both handsome and intelligent!
-
That’s good to hear. It sounds like you posted it before your existing CSS rules and it was negated by one of the latter ones, don’t worry, it happens to all of us every once in a while!
- The topic ‘Center accordion buttons?’ is closed to new replies.