در این کد شما می توانید از css در داخل یک div استفاده کنید بنابراین می توانید برروی یک div کنترل های مختلف قرار دهید.
<!DOCTYPE html>
<html>
<head>
<style>
DIV
}
;background-color: lightgrey
; width: ۵۰۰px
; padding: ۲۵px
; opacity:0.4
; margin: ۲۵px
; box-shadow: ۵px ۵px grey
{
}#cs
; background-color:grey
; width:300px
; margin-top:50px
; margin-left:70px
; margin-right:50px
; margin-bottom:50px
; opacity:1
{
</style>
</head>
<body>
<div>
<div id=“cs”>
<p><b>Welcome here to Css of nested div</b></p></div>
</div>
</body>
</html>
نتیجه کد: