Rounded Corner DIV Techniques
Rounded corners are integral part of modern web design. It is very easy to write rounded corner in table structure. But what about the div structure?
This article elaborates the commonly used techniques available in the internet by which rounded corner structure can be achieved easily -
1. Nifty Corners
Link: http://www.html.it/articoli/nifty/index.html
This is a rounded corner tutorial using CSS and DIV.
2. The ThrashBox
Link: http://www.vertexwerks.com/tests/sidebox/
A very good css based rounded corner tutorial with minimum usage of code.
Posted by admin in Customization, DIV, HTML Elements on Saturday, August 29, 2009
Use picture insted of bullet in HTML List (li)
List is a widely used code in today's web designing. Most of us know how a <li> works.
But sometimes we needs to customize li according to our needs to match it with our design. This tutorial will describe how to customize the <li> bullets and use a picture.
Let's write the CSS code for it first.
list-style-image:url(images/image.gif);
padding-bottom:5px;
text-align:left;
}
#custom ul li {
padding-top:5px;
}
Now we can write the HTML -
<ul>
<li>Content1</li>
<li>Content2</li>
</ul>
</div>
Link
Please leave comments and clarification.
Posted by admin in Customization, HTML Elements on Friday, August 28, 2009
Text Shadow - CSS 2 and DIV Based
Shadow is a very important part of web design. Generally a shadow is created in Photo editing software and the image is used to denote the text.
CSS 2.0 shadow is only supported in Safari. But if there is any need to create shadowed text using only CSS, there is a way in which we can create cross browser compatible shadowed text.
The idea is simple. We can use two layered divs to be used as text effect. The top and the bottom layer are positioned absolute so that they come one under another. The top and left positions are coded such as both classes for the top and the bottom element has 1px gap between them.
First write the CSS -
background-color:#eee;
height:20px;
width:200px;
}
#top-text {
color:#aaa;
font:bold 14px arial,sans-serif;
left:11px;
position:absolute;
top:8px;
}
#shadow-text {
color:#fff;
font:bold 14px arial,sans-serif;
left:12px;
position:absolute;
top:7px;
}
We then place the divs in a central div.
Then we write the HTML -
<div id="shadow-text">Sample Text</div>
<div id="top-text">Sample Text</div>
</div>
The only shortcoming of this technique is the left and top positions are fixed thus the page should be fixed width and not fluid width. Please give your comments.
Posted by admin in DIV, HTML Elements, Text Effects on Thursday, August 27, 2009
CSS Search Box
Search box is a very common component for all web sites now a days. From Commercial sites such as merchandise or product based to simple blog sites, search plays a very crucial role.
In HTML, the Search is generally denoted by a form, textbox and a button.
But as the design of web pages changed from boring html color only designs to a rich image based design, search box also needs to be customized. The following tutorial will tell us how to create a custom searchbox using CSS.
First let us write the code for HTML -
<input id="search" onfocus="if(this.value == "Search") {this.value = "";}" onblur="if (this.value == "") {this.value = "Search";}" size="20" type="text" value="Search" />
<input class="black-button" type="button" value="Go" />
</form>
Now let us write the CSS code for this. To make a modern searchbox, we will need a gradient image and a search icon.
Some free search icon can be downloaded from -
Link
Select a search icon of 16 X 16 pixels.
Now it is time to write the css code.
background:url('../images/search_icon.png') no-repeat;
border:1px solid #ccc;
padding-left:16px;
height:22px;
background-position:2px 2px;
text-align:left;
background-color:#fff;
vertical-align:top;
color:#666;
}
An Image can be used to represent the search button instead of the input.
Posted by admin in HTML Elements on Monday, August 24, 2009
Multi Column DIV Structure
It is very easy to make columns in tables with tr td etc. But as today web sites are more dependent on CSS. And to reduce the load, divs are being popular and standardized for web design.
Now we can all write "div"s in vertical manner. But how to make a div based structure where divs will act as columns rather than Rows?
In this tutorial, we will see how to make such divs.
We will make a three column structure. So first declare three divs -
<div id="left-column"></div>
<div id="right-column"></div>
<div id="center-column"></div>
</div>
width:100%;
}
#left-column{
float: left;
width:33%;
}
#right-column{
float: right;
width:33%;
}
#center-column{
float: right;
width:34%;
}
To make a space between the column, we can set a padding in the page-container class.
Posted by admin in DIV on Saturday, August 22, 2009
CSS Unleashed!!
Today with this post, a new dimension is being added to the world of CSS writing. As we all know, web is an integral part of our life today. Anything and everything from banking to entertainment is driven by html.
But the change hasn't happen only in usability perspective. With the introduction of web 2.0, a new dimension has been added to the web i.e. "Creativity". It is no more that single colored boring and repulsive html files but soothing, glossy eye catching css based image collections which is a "user's delight".
CSS thus today controls the entire web design UI architecture. This web Blog is a little trial of how many things can be done using CSS. Stay tuned. You'll be amazed to see the things coming.
Happy Coding!!!!
Posted by admin in Introduction, Miscellaneous
