Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

how to make a div responsive in css

Use %.
% takes the x% space of the parent element.
example:
This div will have the same width as the body, which is usually the whole page.
<style>
	div{
  	width:100%;
  	}
</style>
<body>
	<div></div>
</body>
 
PREVIOUS NEXT
Tagged: #div #responsive #css
ADD COMMENT
Topic
Name
1+8 =