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; }
Comments
Post a Comment