I am very much impressed by the "inset" like effect in many latest websites. Some examples are alt text http://img687.imageshack.us/img687/457/inset2.png
and
alt text http://img163.imageshack.us/img163/8158/inset1.png
The line in the center. Nowadays, many websites use these kinds of lines/effects.
I tried to achieve the same with borders but the color combination is not working me and it is not proper.
Do other websites use images for these ? is it easy to this ?
Any example css ?
Example sites: http://woothemes.com, http://net.tutsplus.com/ , http://www.w3schools.com (in the header) and in wordpress admin page sidebar
this is css text shadow property.for get this effect use
but really this is effect of color combination that you are using in background and text. so you should do.
Using an
<hr>
is quite clever.Following up on user1302036’s answer, all we need is to set the color of the top and bottom borders for an
<hr>
and set the left and right border widths to 0.3D effects in 2D computer displays are mere optical effects accomplished by the use of colour: lighter variations suggest bright (higher areas) and darker variations suggest shadown (lower areas). Most people is right-handed and writing lights tend to be on the left side of the desktop, so you use an imaginary source of light in the left top corner of the screen.
It's been possible to do it with pure CSS in rectangular areas for years:
Fonts, however, require newer CSS attributes that don't have wide support yet and, also, do not allow to provide more than one colour, so it's common to use images. See http://www.quirksmode.org/css/textshadow.html
Easiest, draw an horizontal rule
with the following styles, contrast can be modified depending on background color:
Use border-bottom and box-shadow.
Check out the Fiddle and Browser Compatibility for box-shadow property.
Here is a more current and flexible solution that can be used.
JSFIDDLE
By using RGBA(Red, Green, Blue, Alpha) you can use white/black with an alpha(opacity) to make the illusion of an inset effect.