Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

responsive width CSS

/* Instead of using px measurements, use % when setting width or height.*/
/* The % is calculted from the width of the parent element.*/
#NonResponsiveWidth {
	width: 1080px;
    height: auto;
}
#responsiveWidth {
	width: 85%;
    height: auto;
}
/*For text, use vw (viewport-width) instead of px when setting font-width*/
#NonResponsiveText { font-size: 20px; }
#responsiveWidth { font-size: 10vw; }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #responsive #width #CSS
ADD COMMENT
Topic
Name
9+9 =