Positioning my login form in the right spot is proving to be a challenge

I'm working on integrating this form into my website, but I'm having trouble placing it in the top right corner of the header.

Below is the HTML code:

 $(function(){
      var $form_inputs =   $('form input');
      var $rainbow_and_border = $('.rain, .border');
      /* Used to provide loping animations in fallback mode */
      $form_inputs.bind('focus', function(){
        $rainbow_and_border.addClass('end').removeClass('unfocus start');
      });
      $form_inputs.bind('blur', function(){
        $rainbow_and_border.addClass('unfocus start').removeClass('end');
      });
      $form_inputs.first().delay(800).queue(function() {
        $(this).focus();
      });
    });

</script>
    <style>

    </style>
</head>
<body id="home">
    <div class="rain">
        <div class="border start">
            <form>
                <label for="email">Email</label>
                <input name="email" type="text" placeholder="Email"/>
                <label for="pass">Password</label>
                <input name="pass" type="password"    placeholder="Password"/>
                                    <input type="submit" value="LOG IN"/>
            </form>
        </div>
    </div>

If it helps, here is all the CSS code for the form:

/* Login Form -------------------------------------------*/

        .border,
        .rain{
            height: 170px;
            width: 320px;
            float: right;
        }
        /* Layout with mask */
        .rain{
             padding: 10px 12px 12px 10px;
             -moz-box-shadow: 10px 10px 10px rgba(0,0,0,1) inset, -9px -9px 8px rgba(0,0,0,1) inset;
             -webkit-box-shadow: 8px 8px 8px rgba(0,0,0,1) inset, -9px -9px 8px rgba(0,0,0,1) inset;
             box-shadow: 8px 8px 8px rgba(0,0,0,1) inset, -9px -9px 8px rgba(0,0,0,1) inset;
             margin: 0 0 140px 0 auto;
        }
        /* Artifical "border" to clear border to bypass mask */
        .border{
            padding: 1px;
            -moz-border-radius: 5px;
            -webkit-border-radius: 5px;
            border-radius: 5px;
        }

        .border,
        .rain,
        .border.start,
        .rain.start{
            background-repeat: repeat-x, repeat-x, repeat-x, repeat-x;
            background-position: 0 0, 0 0, 0 0, 0 0;
            /* Blue-ish Green Fallback for Mozilla */
            background-image: -moz-linear-gradient(left, #09BA5E 0%, #00C7CE 15%, #3472CF 26%, #00C7CE 48%, #0CCF91 91%, #09BA5E 100%);
            /* Add "Highlight" Texture to the Animation */
            background-image: -webkit-gradient(linear, left top, right top, color-stop(1%,rgba(0,0,0,.3)), color-stop(23%,rgba(0,0,0,.1)), color-stop(40%,rgba(255,231,87,.1)), color-stop(61%,rgba(255,231,87,.2)), color-stop(70%,rgba(255,231,87,.1)), color-stop(80%,rgba(0,0,0,.1)), color-stop(100%,rgba(0,0,0,.25)));
            /* Starting Color */
            background-color: #39f;
            /* Just do something for IE-suck */
            filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00BA1B', endColorstr='#00BA1B',GradientType=1 );
        }

        /* Non-keyframe fallback animation */
        .border.end,
        .rain.end{
            -moz-transition-property: background-position;  
            -moz-transition-duration: 30s;
            -moz-transition-timing-function: linear;
            -webkit-transition-property: background-position;  
            -webkit-transition-duration: 30s;  
            -webkit-transition-timing-function: linear;
            -o-transition-property: background-position;  
            -o-transition-duration: 30s;  
            -o-transition-timing-function: linear;
            transition-property: background-position;  
            transition-duration: 30s;  
            transition-timing-function: linear;
            background-position: -5400px 0, -4600px 0, -3800px 0, -3000px 0;    
        }

        /* Keyfram-licious animation */
        @-webkit-keyframes colors {
            0% {background-color: #39f;}
            15% {background-color: #F246C9;}
            30% {background-color: #4453F2;}
            45% {background-color: #44F262;}
            60% {background-color: #F257D4;}
            75% {background-color: #EDF255;}
            90% {background-color: #F20006;}
            100% {background-color: #39f;}
        }
        .border,.rain{
            -webkit-animation-direction: normal;
            -webkit-animation-duration: 20s;
            -webkit-animation-iteration-count: infinite;
            -webkit-animation-name: colors;
            -webkit-animation-timing-function: ease;
        }

        /* In-Active State Style */
        .border.unfocus{
            background: #333 !important;    
             -moz-box-shadow: 0px 0px 15px rgba(255,255,255,.2);
             -webkit-box-shadow: 0px 0px 15px rgba(255,255,255,.2);
             box-shadow: 0px 0px 15px rgba(255,255,255,.2);
             -webkit-animation-name: none;
        }
        .rain.unfocus{
            background: #000 !important;    
            -webkit-animation-name: none;
        }

        /* Regular Form Styles */
        form{
            background: #212121;
            -moz-border-radius: 5px;
            -webkit-border-radius: 5px;
            border-radius: 5px;
            height: 100%;
            width: 100%;
            background: -moz-radial-gradient(50% 46% 90deg,circle closest-corner, #242424, #090909);
            background: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 150, from(#242424), to(#090909));
        }
        form label{
            display: block;
            padding: 5px 5px 5px 10px;
            font-size: 11px;
            color: #777;
        }
        form input{
            display: block;
            margin: 5px 5px 15px 10px;
            width: 85%;
            background: #111;
            -moz-box-shadow: 0px 0px 4px #000 inset;
            -webkit-box-shadow: 0px 0px 4px #000 inset;
            box-shadow: 0px 0px 4px #000 inset;
            outline: 1px solid #333;
            border: 1px solid #000;
            padding: 5px;
            color: #444;
            font-size: 16px;
        }
        form input:focus{
            outline: 1px solid #555;
            color: #FFF;
        }
        input[type="submit"]{
            color: #999;
            padding: 5px 5px;
            float: right;
            margin: 20px 0;
            border: 1px solid #000;
            font-weight: lighter;
            -moz-border-radius: 15px;
            -webkit-border-radius: 15px;
            border-radius: 15px;
            background: #45484d;
            background: -moz-linear-gradient(top, #222 0%, #111 100%);
            background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#222), color-stop(100%,#111));
            filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#22222', endColorstr='#11111',GradientType=0 );
            -moz-box-shadow: 0px 1px 1px #000, 0px 1px 0px rgba(255,255,255,.3) inset;
            -webkit-box-shadow: 0px 1px 1px #000, 0px 1px 0px rgba(255,255,255,.3) inset;
            box-shadow: 0px 1px 1px #000,0px 1px 0px rgba(255,255,255,.3) inset;
            text-shadow: 0 1px 1px #000;
        }

Answer №1

To achieve this effect, you can utilize absolute positioning:

.drop {
  position:absolute;
  right:0;
  top:0;
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

When the mouse button is released or when an event listener is

I've been pondering a question that has yet to be fully answered. When I implement this technique to catch a mouse up event: <div onmouseup="/*Script to be executed*/"></div> Is it more efficient than this newer approach: <div id=" ...

Having trouble with your PHP conditional statements? The IF, ELSEIF, and ELSE might

I've encountered an issue with my PHP script that is designed to update a flat file based on variables passed from an HTML form. The problem lies in the if / elseif / else statement, as it fails to open the correct file during comparison. No matter wh ...

What are some ways to slow down the speed of a canvas animation?

I am currently working on an animation project using JavaScript and canvas. I have a reference fiddle where objects are generated randomly and fall from the top right corner to the bottom left corner, which is fine. However, the issue is that the objects a ...

Modify the appearance of HTML dialog box using CSS styling

Currently, I am working on a Java Spring project that includes a single CSS file consisting of around 1500 rows. Recently, I was tasked with adding a dialog box to one of the screens in the project. The issue I encountered is that the style of the dialog b ...

Scraping the web using Python for HTML data retrieval

I'm working on a Python program to retrieve the card sub-brand and brand based on a card BIN number. The URL for this information is: . The code snippet below fetches the card type from the page. page = requests.get('https://www.cardbinist.com/s ...

What is the method for determining the number of unique tags on a webpage using JavaScript?

Does anyone have a method for determining the number of unique tags present on a page? For example, counting html, body, div, td as separate tags would result in a total of 4 unique tags. ...

What are some strategies for efficiently displaying a large amount of data on a screen using Javascript and HTML without sacrificing performance?

Imagine having a hefty 520 page book with over 6,200 lines of text ranging from 5 to 300 characters each. The challenge lies in efficiently displaying this content on the screen for users to read without causing lag or performance issues. Attempting to re ...

Looking to alter the appearance of a div within an iframe by matching it with the title of the parent window using javascript?

I am currently working on a parent page titled Criatweb, which contains an iframe page. My goal is to modify the display of a specific div within the iframe page only when its title matches Criatweb. I attempted to implement the following script within t ...

Interactive HTML5 map featuring geo tagged points

Seeking an HTML5-based tool to efficiently display a zoomable, panable map (similar to Google Maps) and incorporate a circle at a specific location upon clicking a button on a webpage. Any suggestions for HTML5-compatible frameworks or would JQuery be the ...

Looking to access the layout details of an HTML element similar to what can be done in Firefox's debugger tool?

I am facing a challenge with a aspx.net grid control where I need to extract the first row's information and copy it into another table using JavaScript. To achieve this, I am attempting to calculate the width of each cell in the first row by accessin ...

Is it necessary to reset (local storage, session storage) once the countdown timer reaches zero?

I have successfully implemented a countdown timer using session storage in my code. However, I am looking to enhance its functionality further by: Clearing the local session if the user leaves the site before the countdown timer finishes. Automatically c ...

Eliminate any unnecessary gaps that may exist between the cards within the deck

Utilizing Jinja2 with Flask to render a list on an HTML page, I aim to produce card decks containing data from the list using a Jinja2 loop. This is my current HTML code: <div class="container-fluid"> <div class="row"> <div clas ...

The reset function for the selector is failing to properly reset the data within the table

I need help with a selector that has multiple options and a reset button. When the reset button is clicked, it should reset the selector back to the first option. Although the selector resets as expected when the button is clicked, the data in the table r ...

What is the process for adding color to HTML elements?

Is there a way to assign unique random colors to each individual p tag in ReactJS? function App() { return ( <div> <p style={{ color: "#7fbd73" }}>Hi</p> <p style={{ color: "#3a82e4" }}>Hello</p> < ...

Feeling anxious about the abundance of fields within the table

Currently in the process of planning my upcoming project, a text-based MMORPG game. I'm tackling the design of certain aspects of the database and have encountered a new challenge. One feature of the game involves allowing players to purchase cars and ...

Particle JS - Taking over the entire screen

I have incorporated Particle JS into the banner using the link provided. It should be confined within the banner, with a white background underneath displaying the header text "hello there." However, the Particle.JS effect is currently taking over the enti ...

Activate the horizontal scrollbar within each flex item when it is stretched beyond its original width

My goal is to have both the child-1 (blue) and child-2 (black) retain their original width when the sidebar appears by enabling horizontal scrolling upon clicking anywhere in the demo below. document.body.onclick = () => document.querySelector(&apos ...

Checkbox Selection - Modify Prompt to "Kindly mark this box to continue"

I have created a multi-select checkbox form, and I've added some JavaScript to ensure that the visitor selects at least one option <div class="form-group options"> <label class="control-label col-md-4" for="optiontext">Specify an option&l ...

showing the angular response data in a HTML table layout within a specific div element

I'm currently using the angular-fullstack generator and I've received data in response to a GET request in the form of integer values (1, 2 5, 6 134, 245 236, 567 415, 234 and so on). I'd like to display these values in an HTML t ...

AngularJs - Show the response only upon verifying the correct answer

Let me provide an overview of what has been implemented so far: When a user selects an answer in radio buttons and clicks on "Check Answer", the system displays either "Correct" (in green) or "Incorrect" (in red) in the first answer field. Additionally, th ...