html - Questions about div and id? -


just tutorial. problem {border: 3px solid yellow;}and web page 1 letter has border solid yellow around it.

i have coded below:

#cornholio {          border: 3px solid yellow;           color: red;          position: absolute;          width: 10px;          height:15px;          top:375px;          left:900px;      }
<div id="cornholio">beavis & butthead</div>

here, border wrapping entire text. others said in comments, defining fixed height , width, , therefore these 2 properties not auto (size not depending of content).

auto default value height , width, if don't define them, work need:

css:

#cornholio {     border: 3px solid yellow;     color: red;     position: absolute;     top:100px;     left:100px; } 

here demo


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -