Reputation: 1792
i'm having some problem to center this div in wp.
This booking.com widget is inside the div class, the container i assume.
.et_pb_widget_area .et_pb_widget_area_left .clearfix et_pb_module
.et_pb_bg_layout_light .et_pb_sidebar_0 .et_pb_sidebar_no_border
That is from Divi Theme Builder. His dimensions are 1036 x 341.188;
Tried to put margin: 0 auto in the booking.com class that is(dimensions 362.594 x 284.219):
.et_pb_widget bos_searchbox_widget_class
But no success. I also tried setting max width: 100% to the container and margin: 0 auto; to the search box but also no success.
If needed, its the plugin Booking.com Official Search Box.
Also, this is the website i'm trying to center this: http://198.199.66.183/
Can someone please help me?
Upvotes: 0
Views: 87
Reputation: 388
Give this a shot in your CSS, tested and it seems to work:
.et_pb_sidebar_0.et_pb_widget_area .et_pb_widget{
width: 35%;
margin: 0 auto;
text-align: center;
display: block;
float: none;
}
Code was edited with the live inspector in chrome, here's the code inside the inspector and which element I selected to get this to work:
Hope this helps! Good luck!
Upvotes: 1