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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:53:08+00:00 2026-06-08T07:53:08+00:00

I am trying to create a form with the form part to the left

  • 0

I am trying to create a form with the form part to the left with a background-color of gray. I want this to float to the left and have a red box where the errors will be show up directly to the right. But if you look at how it is displayed in my link http://www.yourfantasyfootballreality.com/createleaguevalidation.php you will see that the box just displays below the form and that the form doesn’t have a gray background color. Can someone please help me make the form background part gray and have the red box displayed to the right…

 <html><head><title>Create a League</title></head>

<body>

<center><h1>Create a League</h1></center>



<div class="form width:400px; height:200px; background-color:gray;">
<form action="createleaguevalidation.php" method="POST">
League Name:       <input style="margin-left:0px;" type="text" name="leaguename" value="<?=$leaguename?>" /><br />
Number of Members: <input type="text" name="members" value="<?=$members?>"/><br>
League Password:   <input type="password" name="leaguepassword" value="<?=$leaguepassword?>"><br>
<input type="submit" value="Register" name="action">
</form>
</div>

<div style="background-color:red; height:200px; width:200px; float:left;">
</div>

</body>
</html>
  • 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-08T07:53:09+00:00Added an answer on June 8, 2026 at 7:53 am

    Your problem lies in this line from your site:

    <div class="form width:400px; height:200px; background-color:gray;">
    

    It should probably read something more like so to be valid:

    <div class="form" style="width:400px; height:200px; background-color:gray;">
    

    Although I would recommend NOT styling it with inline styles, but rather have an external stylesheet. In that way, you could simplify the html like so:

    <div class="form">
    

    And you would have the css like so:

    div.form {
         width:400px; 
         height:200px; 
         background-color:gray;
     }
    

    Also, if you want the red box to appear to the right, given your current styling, you’d want to add a float: left; to your div.form element, like so:

    div.form {
         width:400px; 
         height:200px; 
         background-color:gray;
        float: left;
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a form with quickform (default in the company). This form
I'm trying to create a select box drop down with a twist, Basically this
I'm trying to create a form using Spring @MVC 3.0. This form is supposed
I'm trying to create a drop-down box with a few values. I don't want
I am trying to create a form in Sharepoint using C#. I don't know
I am trying to create a form with many groups containing many radio buttons.
I am trying to create a form with webbrowser control. I am trying to
I am trying to create a form using only JavaScript. I mean create a
I'm trying to create a form that based on the users input would determine
I'm trying to create a form that clients would complete via the web, so

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.