How to reduce Navbar height in Mobile view? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How to reduce Navbar height in Mobile view?

bootstrap and css is used to make web page responsive

1st Dec 2018, 2:38 PM
Aayushi
Aayushi - avatar
3 Answers
+ 2
plz explain
4th Dec 2018, 11:51 AM
Aayushi
Aayushi - avatar
+ 1
@media
1st Dec 2018, 3:45 PM
Gordon
Gordon - avatar
+ 1
1. You can define a second set of styles inside @media so that it will be triggered and replaced the original style. 2. Here is an example how @media is used to alter the positions based on screen width (portrait view of mobile VS landscape view of mobile) https://code.sololearn.com/W02pmd87hzEz/?ref=app Note that the sequence of styles depends on the sequence of the screen size conditions, in my example code it is @media only screen and (max-width: 900px) { } @media only screen and (max-width: 400px) { } 3. Basic Understanding at https://www.w3schools.com/cssref/css3_pr_mediaquery.asp 4. Pratical ways at https://css-tricks.com/snippets/css/media-queries-for-standard-devices/ 5. Full details https://developer.mozilla.org/en-US/docs/Web/CSS/@media Especially the browser compatibility
4th Dec 2018, 12:50 PM
Gordon
Gordon - avatar