Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8504435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:01:48+00:00 2026-06-11T02:01:48+00:00

On the twitter login page, the label for input fields arrive inside input fields

  • 0

On the twitter login page, the label for input fields arrive inside input fields that uses a common trick with javascript/jquery. However, I went through a twitter source to figure out how they are doing that. I found onChange: it adds a class ‘hasome’ to a parent div and has a default text as a span, which never gets a property like display:none;.

I have tried to go through their HTML/CSS/JS but could not find their methods. Can someone please tell how twitter is doing that?

Edit
Twitter code:

<div class="placeholding-input username hasome">
    <input type="text" class="text-input email-input" name="session[username_or_email]" title="Username or email" autocomplete="on" tabindex="1">
    <span class="placeholder">Username or email</span>
</div>

Added twitter HTML in question. When we add some code, it only add one class ‘hasome’ in parent div. in firebug, I could not see any property assigned to class ‘hassome’. My question is where is there code which is doing that or CSS if it is achieved by CSS.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T02:01:50+00:00Added an answer on June 11, 2026 at 2:01 am

    While the hasome class is applied to the parent div, it’s used in a selector that’s setting CSS values on the child span. So in Firebug (or Chrome or IE’s developer tools), you’ll need to keep an eye on that child span, not the div, to see what’s going on.

    You should end up seeing the following rules applied, from the CSS file t1_core_logged_out.bundle.css:

    .has-content .placeholder, .hasome .placeholder
    {
        font-size:0!important;
        z-index:-1;
        -moz-opacity:0;
        opacity:0;
        -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
        filter:alpha(opacity=0);
    }
    

    The part of the rule that ends up taking effect is the “.hasome .placeholder” part: when an element with style .placeholder has an ancestor with class .hasome, then various techniques are used to hide that child element. It’s basically using a class on a parent to control styles of a child or descendant, which is a fairly common CSS technique.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

page here: http://webpages.marshall.edu/~glasser1/jquery.html I'm trying to replicate the old twitter page login style. If
If you go to the twitter login page, you'll see that in the password
for the page I am doing needs a login authentication using Twitter (using tweetphp
I am trying to write twitter app using android. The twitter login page opens
On twitter they have a login link and when js is enabled jquery shows
Hitting the url http://twitter.com/home?status=<status_msg> takes us to the twitter login page and once logged
I'm making a login page with Twitter's Bootstrap, and I have a problem. I
I want to make a login to twitter by myself programmatically. Is it possible
I'm trying to set up Omniauth login for Twitter/FB. I created my own authentication
The goal is to let users login via Twitter, get OAuth token and secret

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.