Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS It it posible to center a div as if it was wider then it is? Re: It it posible to center a div as if it was wider then it is?

#131174
Merri
Participant

One way to adjust more:

article{
max-width: 300px;
height: 300px;
background: red;
margin: auto;

position: relative;
left: 11.75%;
}

But it’ll go out of the screen eventually. Using padding-left might work as well. Of course it is best to go with @TheDoc’s advice.