0

Of min-height, max-height, min-width and max-width

I have noticed that we don't get to have a thorough explanation on why somethings are the way they are. for example personally for me I would like to know why we should use min-height, max-height properties and others for my CSS. For one, I know these properties are critical in responsive Web development and if we don't get to know about it deeply here, then I think we are just learning CSS for the sake of learning and nothing more.

17th Aug 2017, 8:01 AM
tunde
8 Réponses
+ 4
on solo its just the basics to get you started. for anything more informative you will have to fill the knowledge gaps from books, videos, websites and so on.
17th Aug 2017, 8:13 AM
Lord Krishna
Lord Krishna - avatar
+ 1
@michele yes I use bootstrap very well, infact I created a portfolio page and a random quote machine using this framework. But right now, I think it's time to get my hands dirty...sometimes it's not always bootstrap I want to use. currently I'm using CSSgrid framework (which is quite good) but the aspect of RWD isn't covered here and so you have to find a way around. I appreciate your efforts no doubt.
18th Aug 2017, 9:17 PM
tunde
0
you want to know why you have to use min-height, so i will give you this simple example: we have a site with 2 pages; the first page has header, content and footer, the second page has only header and footer ... where the footer will be positioned in the 2nd page? right! Just below the header! you can fix this with min-height on your content.
17th Aug 2017, 8:57 AM
Michele Virgilio
Michele Virgilio - avatar
0
@Michele still not clear. .are you saying to give room for the content in the second page, it is useful if I use min-height for the header? I thought using min-height etc is in response to RWD? or what am I missing?
17th Aug 2017, 9:02 AM
tunde
0
not for the header but for the content ... if you're content is in a div and you put a rule min-height: 100vh; to this then your content will cover the entire page at least... try to search sticky footer on google
17th Aug 2017, 9:15 AM
Michele Virgilio
Michele Virgilio - avatar
0
look this simple example. Try to press many times the button the put min-height in a comment and try again to see the difference. please give a like if this is useful ;) https://code.sololearn.com/WzEEQZSI2EMj/?ref=app
17th Aug 2017, 10:36 AM
Michele Virgilio
Michele Virgilio - avatar
0
@michele yes I understand the properties in the context of what you explained. However my question is in the context of designing a Responsive Website and how one will use it in and out of a media query.
17th Aug 2017, 9:28 PM
tunde
0
@tunde i can't give you the perfect answer you're looking for because this will require a lot of experience and at the moment i lack of this. i gave you this example so you can test somethings by yourself, in my opinion how and where to use the elements you ask for depends by the web site you want to do. At the moment to make a good responsive site is good to use twitter bootstrap. look for it
18th Aug 2017, 9:26 AM
Michele Virgilio
Michele Virgilio - avatar