This is my attempt but the div wrapper doesn’t center the content div.
I have a div containing ang box shape with another div with texts.
.wrapper {
position:absolute;
left: 50%;
}
.content {
width:90%;
text-align:justify;
left: -50%;
display: inline-block;
}
.button {
text-align:center;
}
<div class="wrapper">
<div name="box" style="background-color:#FF6201;width:220px;height:220px;:30px">
<div class="content">Content and Creative Writing, Social Media Management, SEO, Outbound Sales, Outbound Sales Appointment Setting,<button class="button">
weee</button>
</div>
</div>
</div>
I can actually do on html by adding tags but i am hoping to make this done in css. pls help.
2
Answers
I found this nifty trick a while back:
This will center any statically positioned Div. I am assuming that you want the box centered; if so I would move the class=”content” to that element and then revise your css to the following:
Here is a fiddle link to see if this is what you were going for: https://jsfiddle.net/e3tsj8qf/5/
Edit:
Code from fiddle referenced below (accepted as answer):
Try this code markup and style…..