Hi guys,
I have a <div> tag and the CSS properties are below,
So how to make this responsive?Code:#header{ background-color:#333; height:150px; }
Thank you very much in advanced.
| SitePoint Sponsor |
Hi guys,
I have a <div> tag and the CSS properties are below,
So how to make this responsive?Code:#header{ background-color:#333; height:150px; }
Thank you very much in advanced.
I Love JavaScript & jQuery...
I think I solved the problem.
The solution,
Code:#header{ background-color:#333; width: 100%; height: 20%; }
I Love JavaScript & jQuery...

No, the right answer is:
A div is display: block by default so will be 100% wide.Code css:
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![]()
Bookmarks