Title: Centring elements
Last modified: August 20, 2016

---

# Centring elements

 *  Resolved [m-dawg](https://wordpress.org/support/users/m-dawg/)
 * (@m-dawg)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/centring-elements/)
 * Hello,
 * Something very basic is driving me nuts. I can’t figure out — even with Inspector—
   what it is in my CSS that’s preventing anything on my development page from being
   in the centre. [http://www.thebutterfliesareattacking.com/home-2/](http://www.thebutterfliesareattacking.com/home-2/)
 * If anyone smarter than me can figure it out (it’ll probably take less than a 
   sec for you guys!) I’d be eternally grateful. Not only is the accordion not in
   the centre of the page, the table isn’t in the centre of the accordion. Gah!
 * Cheers.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/centring-elements/#post-2675967)
 * Making the “accordion” wider essentially centers it. You can add a width attribute
   in the css for the accordion plug in:
 *     ```
       .wp-accordion {
       /*	border: 1px solid #F00;*/
               width: 940px;
       	margin: 20px 0;
   
       }
       ```
   
 * I used 940px which seems to be about right — but you can fuss with it however
   you like.
 * When you use plug-ins, they don’t always “fit” perfectly with the theme…
 *  Thread Starter [m-dawg](https://wordpress.org/support/users/m-dawg/)
 * (@m-dawg)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/centring-elements/#post-2675969)
 * Yes, the problem with widening is cross-browser compatibility. For some reason
   Firefox likes to make things wider than they are and I have no idea what anything
   looks like in IE (yet). I’ll faff with it but what I’d rather it was “clean”.
   Thanks though.
 * Still, if there’s a “clean” solution that enables me to centre it I’d rather 
   use that. And incidentally, if anyone’s using IE and would care to tell or show
   me what they see that would be incredibly helpful… I’m on a Mac which makes everything
   look better 🙂 And Wine is a waste of time.
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/centring-elements/#post-2675982)
 * There is not a simple solution because there is a lot of complicated CSS code
   from multiple stylesheets and many nested elements that are involved. You’ll 
   have to be fairly good at CSS to do what you want. Generally, it is beyond the
   scope of these forums to provide detailed CSS help…though some of us help when
   and where we can.
 *  Thread Starter [m-dawg](https://wordpress.org/support/users/m-dawg/)
 * (@m-dawg)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/centring-elements/#post-2675984)
 * Fair enough. Thanks anyway, I’m going to give widening it a crack. Might play
   around with margins too though it’s quite hacky.
 *  Thread Starter [m-dawg](https://wordpress.org/support/users/m-dawg/)
 * (@m-dawg)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/centring-elements/#post-2676015)
 * Weirdly, I fixed it with padding rather than margins, but that plus a little 
   judicious resizing did the trick.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Centring elements’ is closed to new replies.

## Tags

 * [center](https://wordpress.org/support/topic-tag/center/)
 * [centre](https://wordpress.org/support/topic-tag/centre/)
 * [centring](https://wordpress.org/support/topic-tag/centring/)
 * [css](https://wordpress.org/support/topic-tag/css/)
 * [html elements](https://wordpress.org/support/topic-tag/html-elements/)

 * 5 replies
 * 2 participants
 * Last reply from: [m-dawg](https://wordpress.org/support/users/m-dawg/)
 * Last activity: [14 years, 1 month ago](https://wordpress.org/support/topic/centring-elements/#post-2676015)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
