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 8513997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:44:23+00:00 2026-06-11T04:44:23+00:00

I am trying to align these divs side by site, but can not. How

  • 0

I am trying to align these divs side by site, but can not. How do i do it?

    <center>

    <div class="lgsn">

        <div class="login"></div>


        <div class="signup"></div>

    </div>

<center>

and CSS

.lgsn
{
    width: 100%;
    height: 100%; 
    position: fixed;
}

.login, .signup
{
    background-color: #000;
    width: 450px;
    height: 350px; 
    border-radius: 4px; 
    opacity: 0.50; 
}
  • 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-11T04:44:25+00:00Added an answer on June 11, 2026 at 4:44 am

    A few things you should consider.

    1. I suggest getting rid of that center tag. It’s depreciated and goes against the separation rule (keep it simple… semantics and decision-making on the markup; style, color and fonts in the CSS). As an alternative to the center tag, you’re going to want to use text-align: center; as a declaration on the CSS side. Remember that text-align: center; aligns the text to the center of it’s parent, so if the parent is displayed inline, that solution will still be centering your text, but the effect of it won’t be noticeable by you. In other words, to center text in a displayed block parent, use text-align: center;. To center the whole div (Note: centering the div… not the text) of a displayed block element, use margin: 0 auto;.
    2. You have several options on how to take displayed block elements and make them side-by-side. In most situations, your best option is to use a float (another sometimes useful option is display: inline-block). It may not seem obvious at first because the learned use is to float images as seen in magazines and news paper to get text to wrap around an image, however, floating a div will work to wrap one div around another. The value for float can be left, right, inherit or the default none.
    3. It’s also extremely important to remember what a float actually does. It makes things wrap. That means when you start to noice “weird” behavior with divs being floated, it’s because you’re forgetting what the browser thinks of a float as. (I.E., the browser is wrapping things you didnt intend for it to wrap, such as divs or blocks below the float-applied div) Usually, it’s a good indication that your float has to be cleared. To do that, you use the syntax clear: both. (substitute both for right or left if you’re wanting to only clear a float to the right or a float to the left) applied to a usually empty (it really doesn’t need to be empty, but it seems that it’s become convention to do so) element placed where required. The value for clear can be left, right, none, inherit or both.

    Good resources.

    The below resources are recommended for you to learn further in-depth on what a float is truly capable of. Please take your time to go through the below links.

    • http://css-tricks.com/all-about-floats/
    • (TLDR:) http://css-tricks.com/video-screencasts/42-all-about-floats-screencast/
    • https://developer.mozilla.org/en-US/docs/CSS/float
    • On the ride hand side of this page, there are tons of float-related issues. Take a moment to look through them before posting a float issue, it’s probably been covered before.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to center these buttons, but most stuff online does not work.
I am trying to align these divs next to each other but only the
Problem: I am trying to align divs next to each other using float:left but
I am trying to center align my google chart but have been unsuccessful in
I have a small problem. I am trying to align two divs side by
Im trying to align a jquery popup div to the center of my screen
I am trying to align a textblock vertically and horizontally center in a stack
I am trying to align my bitmap font text in my OpenGL application but
I'm trying to align small boxes in a row. These boxes have something like
Im trying to figure this out, please consider these styles: .text_left { text-align:left; }

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.