sara sara - 5 months ago 6
CSS Question

How to center images inside div that are float left

my website is watersedgeofshelton.com and on the "floor plans" page I have two images side by side that use the code float:left
my problem is that I can not get them centered on the page and also still be side by side

thank you!

div#floorplans {
text-align: center;
}
div#admiral {
float: left;
padding-right: 20px;
}
div#clipper {
float: left;
}

Answer

Add below code to your CSS and check your page -

div#admiral,
div#clipper {
    width: 50%;
}

and remove this one -

div#admiral {
    padding-right: 20px;
}