[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

CSS text when off-focus

Posted on 2014-04-21
3
Medium Priority
?
539 Views
Last Modified: 2014-04-30
Hello,

Please take a look at this link:

https://id.avast.com/login?target=https%3A%2F%2Fmy.avast.com%3A443%2F

Notice the legends "Email Address" and "Password" on the textfields. Then the textfields get focus, the legend dissapears.

I asume this is CSS? If so, how can I do that, for an email address and password?

Thanks!
0
Comment
Question by:SimpleDude
[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 15

Expert Comment

by:Ess Kay
ID: 40013454
This is for links

a:link {color:#FF0000;}      /* unvisited link */
a:visited {color:#00FF00;}  /* visited link */
a:hover {color:#FF00FF;}  /* mouse over link */
a:active {color:#0000FF;}  /* selected link */

Open in new window



Something similar should work for textbox
specifically the focus command

http://www.w3schools.com/cssref/sel_focus.asp

input:focus
{ 
background-color:yellow;
}

Open in new window

0
 
LVL 36

Accepted Solution

by:
Miguel Oz earned 2000 total points
ID: 40013614
This is not CSS, it is the HTML5 placeholder attribute being displayed in the inputs. In your sample site, the first textbox contains "Email address" as shown below:
<input name="username" placeholder="Email address"/>

Open in new window


If you need the same behaviour use  placeholder attribute  in your inputs. For more info check:
http://www.w3schools.com/Tags/att_input_placeholder.asp
0
 

Author Closing Comment

by:SimpleDude
ID: 40033088
That Works excellent!

Thank you so much
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

650 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