Saumyojit
Well-Known Coder
<div id="rt"></div>
this line i have written in index.html file
CSS:
#rt {
background-color: red;
width:70%;
height: 300px;
}
Output is showing the right : A red background color block is showing .
NOw if i use inline css here, there is no blue background coming .
But if i write some text in between div tag then the container with background blue is showing why so ?
HTML:
<div style="height:60%; width:50%; background:blue;">
</div>
Last edited by a moderator: