Title: vertical centreing
Last modified: September 1, 2016

---

# vertical centreing

 *  Resolved [jenosbornwp](https://wordpress.org/support/users/jenosbornwp/)
 * (@jenosbornwp)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/vertical-centreing/)
 * Does anyone know why top: 50% is not working in this case? and my content which
   should be vertically centred is disappearing off the top of the screen?
 *     ```
       html, body { height:100%, width: 100%; }
       #holding-container { position: relative; height: auto; }
       #holding {
       /*   margin:0 auto;*/
           width:600px;
           height:700px;
           position:absolute;
           left:50%;
           top:50%;
           margin:-350px 0 0 -300px;
       }
       ```
   
 *     ```
       <div id="holding-container">
       <div id="holding" style="text-align: center;"><img class="medium-large alignnone wp-image-48" src="..." alt="" width="600" height="600" />
       <a style="text-decoration: none;">...</a></div>
       </div>
       ```
   

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

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [9 years, 10 months ago](https://wordpress.org/support/topic/vertical-centreing/#post-7594431)
 * Can you show us a webpage with the problem?
 *  Thread Starter [jenosbornwp](https://wordpress.org/support/users/jenosbornwp/)
 * (@jenosbornwp)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/vertical-centreing/#post-7594432)
 * [http://commucci.co.uk/holding/](http://commucci.co.uk/holding/)
    Thank you
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [9 years, 10 months ago](https://wordpress.org/support/topic/vertical-centreing/#post-7594442)
 * Is it positioned off the screen even when you don’t use absolute positioning?
 *  Thread Starter [jenosbornwp](https://wordpress.org/support/users/jenosbornwp/)
 * (@jenosbornwp)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/vertical-centreing/#post-7594447)
 * if I just take out the position: absolute; then yes, it’s still off the page.
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [9 years, 10 months ago](https://wordpress.org/support/topic/vertical-centreing/#post-7594450)
 * So it’s because of this:
 *     ```
       margin: -350px 0 0 -300px
       ```
   
 * Which means you’re moving something up the screen
 *  Thread Starter [jenosbornwp](https://wordpress.org/support/users/jenosbornwp/)
 * (@jenosbornwp)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/vertical-centreing/#post-7594452)
 * ok, thank you, got myself totally muddled but that makes sense now.

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

The topic ‘vertical centreing’ is closed to new replies.

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)

 * 6 replies
 * 2 participants
 * Last reply from: [jenosbornwp](https://wordpress.org/support/users/jenosbornwp/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/vertical-centreing/#post-7594452)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
