Solved

input textbox with shadow

Posted on 2010-09-09
3
1,165 Views
Last Modified: 2012-05-10
textbox with a shadow
like
http://roomorama.com/
has


how is this done
0
Comment
Question by:rgb192
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 40

Expert Comment

by:gurvinder372
ID: 33641535
0
 
LVL 3

Accepted Solution

by:
Maverick-lm earned 500 total points
ID: 33641821
They're doing it through the magic of an image file (http://roomorama.com/images/input-field.png?1266446897) as a positioned background image.

Basically you want a class on the <input> tag that sets the background style to the image, and then a combination of setting border to none, and set widths, heights, line-heights and padding as appropriate.

They're using a single png image file with multiple examples of shadowed borders and using the background-position style to determine which section of the png image to use depending on the various field widths they want to use. Obviously you can simply use a single image and leave it position at 0 0.

Have a look at the source using the Firebug extension in Firefox, Developer Tools in IE8 or Chrome, that will help you a lot.

For example, the top most input for "City" mainly uses this css (I removed some of the surplus classes for clarity):

input.fixed.large {
background-position:left -112px;
width:170px;
}

input.fixed {
background:url("/images/input-field.png?1266446897") repeat scroll 0 0 transparent;
border:medium none;
font-size:11px;
height:16px;
line-height:20px;
padding:5px 7px 7px 5px;
width:120px;
}

The input has class="fixed large toggleval acInput", where "fixed" and "large" apply the above css.

Open in new window

0
 

Author Closing Comment

by:rgb192
ID: 33657594
thanks
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question