Reputation: 2344
I want the picture plus the gray background to be centered.
The body's style is set like this:
body {margin-left:auto;margin-right:auto;width:1000px;}
The div for the picture is this:
{width:auto;margin-left:auto;margin-right:auto;float:right;}
The image style is this:
{border:0px;padding:0px;margin:0px;}
If I removed the float the gray border around the image will fill all the page. and I do not want to specify a certain width for the border because some images are big and some are small.
I need help centering the image!
Upvotes: 0
Views: 146
Reputation: 228302
text-align: center
to #chpheader
, and remove float: right
.display: inline-block
to <div style="text-align:center;background-color:#DCDEDD;margin-top:20px;border-radius: 20px;">
.display: inline-block; *display: inline; zoom: 1
.You should not be using inline styles.
Upvotes: 4