Re:Get HTTPS for free
by kelukelugames on Saturday January 30, 2016 @03:07PM
(#11003506)
What is the padding for? Doesn't make a difference for me.
[ Parent
| on HN ]
Mobile.
@kelukelugames
Sure. The padding adds 15px of space on both sides of the body so that the text doesn't "stick" to the edges when the size of the screen is less than the defined max-width (i.e: on mobile). Doesn't make a difference on desktop though.
Re:Get HTTPS for free
by kelukelugames on Saturday January 30, 2016 @03:37PM
(#11003630)
Thank you! Now I don't have to use Bootstrap on every site I make. :)
Re:Get HTTPS for free
by kelukelugames on Saturday January 30, 2016 @03:23PM
(#11003576)
Can you please explain? I want to improve on CSS, but have under developed eye for design.
This stuff belongs in the domain of graphical design. Rule of thumb is to provide padding towards the edges around text, a little more to the sides than to the top, eg. [padding: 1em 2em;] depending on the font used because of inherent vertical padding in writing. If the text hugs the container, it seems cramped, and we get distracted by the lines of the bounding container.
I recommend giving "The Elements of Graphic Design" by Alex W. White a read, where he talks about issues of space and typography and why certain conventions exist. CSS is after all a way to express graphical design relations in code, which isn't very useful if one is unaware of the principles driving clear and useful design.