Mess with css div
Hi I'm new to forum so hopefully posting to correct category .
I just need help with my issue with css div . If I add 1px of padding or 1px border it add at least 10px on div height .
Concrete example here
Thanks for reply
border: 0px solid black;
when I use normal text , div is wrapped around and padding is working properly but if I use h1 text with no border or padding it's wrapped around until I add 1px padding or border then it is about 10px
Not sure I really understand the question, but header tags have default padding. So if you want your header tag to have 0 padding, then you have to spec 0 padding. Also, when you do have something with a zero measure, don't use "px", "em", etc. Just put 0, e.g. padding: 0; - not padding: 0px;. It's not "wrong", per se. It will still work, but semantically, you don't use the measurements when something is just 0.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread