html - Why do we use overflow:hidden; -


why use these 3 properties on menu. unsure why need these 3 properties. love know technical side of ?

margin: 0; padding: 0; overflow: hidden; 

html:

<ul>   <li><a class="active" href="#home">home</a></li>   <li><a href="#news">news</a></li>   <li><a href="#contact">contact</a></li>   <li><a href="#about">about</a></li> </ul> 

css:

ul {     list-style-type: none;     margin: 0;     padding: 0;     overflow: hidden;     background-color: #333; }  li {     float: left; }  li {     display: block;     color: white;     text-align: center;     padding: 14px 16px;     text-decoration: none; } 

the default values of padding , margin zero(browser dependent). don't think there difference if remove them.

overflow : hidden property make text going out of div hidden i.e. not shown on screen , clipped.

overflow : auto make scroll bar's appear if text goes out of div.

there lot more option's available please go through following link more information::

link


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -