so I'm trying to create a Navigator for my website and I wanted to ask how can I tell the website that if the Width of the website is shrinking then the space between the listed words should shrink ore the words should disappear.
Asked
Active
Viewed 24 times
-1
-
Possible duplicate of [Font scaling based on width of container](https://stackoverflow.com/questions/16056591/font-scaling-based-on-width-of-container) – Jan May 28 '19 at 16:52
-
There are several ways to approach this. you can myke your document responsive by only using css (see comment above) or handle special cases with javascript (see [Get the browser viewport dimensions with JavaScript](https://stackoverflow.com/questions/1248081/get-the-browser-viewport-dimensions-with-javascript)). – Jan May 28 '19 at 16:56
1 Answers
0
You can change CSS properties when the page changes size using media queries:
Example:
@media only screen and (max-width : 1024px){
// CSS properies for when screen width becomes less than 1024px
}
Reference to tutorial website: https://www.w3schools.com/css/css_rwd_mediaqueries.asp
Documentation: https://www.w3.org/TR/css3-mediaqueries/
Mohammad Zamanian
- 733
- 2
- 7
- 17