CSS: Continuing the Clarification of CSS Classification - Attack of the Invisible Man
(Page 4 of 4 )
Arguably one of the coolest pervert super powers around, the ability to turn invisible is a stalker's dream. Super power + women's locker room = what I want for Christmas. While I haven't found a way to invent invisibility yet, I can show you how to make your elements invisible, or more boring, visible. Here is how:
<html>
<head>
<style type="text/css">
h1.visible {visibility:visible}
h1.invisible {visibility:hidden}
</style>
</head>
<body>
<h1 class="visible">Now you see me</h1>
<h1 class="invisible">Now you don't. Here's a hint: I'm hiding in the bushes.</h1>
</body>
</html>
Cleared for Landing
You can clear the side of an element using the clear property. Using this property prevents other floating elements from appearing on a given side. Here are the properties you can set:
Left: No floating allowed on left side
Right: No floating allowed on the right side
Both: No floating allowed on either side
Default: Floating allowed on either side
Here is how you set the clear:
<html>
<head>
<style type="text/css">
img
{
float:right;
clear:both;
}
</style>
<img src="sample.gif" width="100" height="80" />
<img src="sample.gif" width="100" height="80" />
</body>
</html>
Well that is it for the Classification properties. In our next tutorial we will discuss Positioning in CSS, some of which we covered in the past two articles. So be sure to come back often.
Till then...
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |