Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

responsive text 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 css-tricks.com #
 
PREVIOUS NEXT
Tagged: #responsive #text #CSS
ADD COMMENT
Topic
Name
8+2 =