Hi guys,
I have a <div> tag and the CSS properties are below,
#header{
background-color:#333;
height:150px;
}
So how to make this responsive?
Thank you very much in advanced.
Hi guys,
I have a <div> tag and the CSS properties are below,
#header{
background-color:#333;
height:150px;
}
So how to make this responsive?
Thank you very much in advanced.
I think I solved the problem.
The solution,
#header{
background-color:#333;
width: 100%;
height: 20%;
}
No, the right answer is:
A div is display: block by default so will be 100% wide.
If you don’t set a height then it will be the height of it’s contents.
You need no styles at all to make a div responsive