Title: Center align CSS
Last modified: December 9, 2024

---

# Center align CSS

 *  [sacconi](https://wordpress.org/support/users/sacconi/)
 * (@sacconi)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/center-align-css/)
 * I’m trying to center the booking form but this is not working for me:
 *     ```wp-block-code
       .bookingaff iframe {    margin-left: calc((100% - 770px) / 2);}
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcenter-align-css%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Benedikt Ledl](https://wordpress.org/support/users/benniledl/)
 * (@benniledl)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/center-align-css/#post-18186533)
 * Hey 🙂
   Try this:
 *     ```wp-block-code
       .entry-content:has(.bookingaff) {  text-align: center;}
       ```
   
 *  Thread Starter [sacconi](https://wordpress.org/support/users/sacconi/)
 * (@sacconi)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/center-align-css/#post-18189888)
 * [@whyviru](https://wordpress.org/support/users/whyviru/) Ok, it’s working, I 
   just changed the background [https://test.sacconicase.com/hotels/](https://test.sacconicase.com/hotels/)
 *     ```wp-block-code
       bookingaff {display: flex; justify-content: center; align-items: center; width: 100%; height: auto;background-color: lightgrey; padding-top:30px}.bookingaff iframe { max-width: 100%; width: 770px; height: 500px;border: none;background-color: lightgrey;}
       ```
   
 * Maybe could you tell me if you see the booking form in your own language? I need
   to discover if booking is intelligent enough to show the right language to the
   user…thank you
    -  This reply was modified 1 year, 6 months ago by [sacconi](https://wordpress.org/support/users/sacconi/).
 *  [Benedikt Ledl](https://wordpress.org/support/users/benniledl/)
 * (@benniledl)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/center-align-css/#post-18190193)
 * [@sacconi](https://wordpress.org/support/users/sacconi/)
 * In my german browser the booking form is in german, the rest of the website is
   not though.
 *  Thread Starter [sacconi](https://wordpress.org/support/users/sacconi/)
 * (@sacconi)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/center-align-css/#post-18190198)
 * thank you for the usefull feedback, you are lucky because you can see my entire
   site in german, you have a language selector in the main menu of the website

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

The topic ‘Center align CSS’ is closed to new replies.

## Tags

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

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 4 replies
 * 4 participants
 * Last reply from: [sacconi](https://wordpress.org/support/users/sacconi/)
 * Last activity: [1 year, 6 months ago](https://wordpress.org/support/topic/center-align-css/#post-18190198)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
