I am trying to build a responsive layout using bootstrap and currently am defining some of the titles with font-size:3em;
But when the layout is shrunk down this is too big. How can I responsively reduce the size of the text?
This question is related to
css
twitter-bootstrap
responsive-design
Well, my solution is sort of hack, but it works and I am using it.
1vw = 1% of viewport width
1vh = 1% of viewport height
1vmin = 1vw or 1vh, whichever is smaller
1vmax = 1vw or 1vh, whichever is larger
h1 {
font-size: 5.9vw;
}
h2 {
font-size: 3.0vh;
}
p {
font-size: 2vmin;
}
Source: Stackoverflow.com