width : 500px ;
margin : auto ;
border : 3px solid #73AD21 ;
}
div.ex2 {
max-width : 500px ;
margin : auto ;
border : 3px solid #73AD21 ;
}
Change the browser window width to see the difference
Previous lesson: Display element in CSS
The following article: Location of elements in CSS