Skip to content


Att centrera en div i CSS

 

Att man alltid ska glömma hur man centrerar en div i CSS, nu har jag iallafall skrivit ned detta på denna blog så jag kommer åt den varje dag.

Gör en container som håller layout-divarna. Sätt

margin: auto;

på containern så centreras innehållet.

Random Posts

Posted in CSS.

Tagged with .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.


Blogg listad på Bloggtoppen.se
Blogg Topplista
Top Internet bloggar