The following example is from w3schools:
If I change the width of selector p.ex to 50, then the sentence overlaps the paragraph that follows. Why does this happen?Code:<html> <head> <style type="text/css"> img.normal { height:auto; } img.big { height:120px; } p.ex { height:100px; width:50px; } </style> </head> <body> <img class="normal" src="logocss.gif" width="95" height="84" /><br /> <img class="big" src="logocss.gif" width="95" height="84" /> <p class="ex">The height and width of this paragraph is 100px.</p> <p>This is some text in a paragraph. This is some text in a paragraph. This is some text in a paragraph. This is some text in a paragraph. This is some text in a paragraph. This is some text in a paragraph.</p> </body> </html>



Reply With Quote

Bookmarks