
I was wondering how I could achieve this effect. Firstly content currently is in a div called ‘contentDiv’. I have all the following content float:right of the div. What I want to achieve is an imaginary border (look at image) in which the content cannot cross.
Then I want the content to be centered.
How would I achieve this with CSS? Or what elements could I use to replicate this effect.
I have looked into centering the content and this code works for me –
margin-left: auto;
margin-right: auto;
1 Answer