Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Der Titel des Dokuments</title> <style> .center { width: 400px; height: 150px; border: 1px solid #666; display: -webkit-flex; /* Safari */ -webkit-justify-content: center; /* Safari 6.1+ */ display: flex; justify-content: center; } .center div { width: 70px; height: 70px; background-color: #ccc; border: 1px solid #666; } </style> </head> <body> <h2>Beispiel für die Eigenschaft Justify-content</h2> <p>Hier ist "justify-content: center" eingestellt:</p> <div class="center"> <div>1</div> <div>2</div> <div>3</div> </div> </body> </html>