'clear' Example : clear « CSS « HTML / CSS






'clear' Example

 
    
<html>
<head>
<style>
#secL { 
   position:absolute; 
}
.style1 { 
   clear:left!important; 
}
.style2 { 
   clear:none!important; 
}
</style>
</head>
<body>
    <img src="http://www.java2s.com/style/logo.png" 
         width="71" 
         height="99" 
         style="float:left">
        <a id="myL" 
           href="http://www.java2s.com" 
           onClick="this.className='style2';return false" 
           onMouseOver="this.className='style1'">
           Disabled link
        </a>
    <img src="http://www.java2s.com/style/logo.png" 
         alt="This is a float=right image" 
         width="79" 
    height="99">
</body>
</html>

    
      
        
  








Related examples in the same category

1.clear: left with float: left
2.clear: left with float right
3.clear: both
4.clear both
5.clear left
6.clear left only
7.Float and Clear Control under CSS
8.Float Clearing
9.Clearing floated content
10.The clear property cancels the effects of the float property, and can prevent wrapping from taking place.
11.clear: both;