I am trying to add text to the images in contentflow but as I scroll through them I need the text to resize so the text does not move.
Asked
Active
Viewed 85 times
1 Answers
0
I don't know if there's automatic way of doing this, but as of responsive web design you can hardcore the font size through CSS or using jQuery.
jQuery
$(window).on('resize', function(event) {
if($(window).width() < 400) {
$('.CAPTIONCLASS').css("font-size", "20");
}
else {
$('.CAPTIONCLASS').css("font-size", "10");
}
});
CSS
@media screen and (max-width: 400px) {
.CAPTIONCLASS {
font-size: 20px;
}
}
@media screen and (max-width: 100px) {
.CAPTIONCLASS {
font-size: 15px;
}
}

HelpNeeder
- 6,383
- 24
- 91
- 155