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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:41:54+00:00 2026-06-14T23:41:54+00:00

I am not very strong with css but what I have is 2 forms

  • 0

I am not very strong with css but what I have is 2 forms below:

    //below is where it displays course name

        $outputcourse = ""; 
        $outputcourse .= "<p><strong>Course:</strong> " . $course .  " - "  . $coursename . "</p>";

    //below is where it displays module name

    $outputmodule = ""; 
    $outputmodule = sprintf("<p><strong>Module:</strong> %s - %s</p>", $moduleId, $moduleName);

    //below is form where it displays assessments drop down menu

        $assessmentform = "<form action='".htmlentities($_SERVER['PHP_SELF'])."' method='post'>
<p>{$outputcourse}</p>
<p>{$outputmodule}</p>
        <p><strong>Assessments:</strong> {$sessionHTML} </p>   
        </form>";

        echo $assessmentform;

        }

        //below is form where it displays all of the text inputs and submit button

        $editsession = "<form id='updateForm'>

            <p><strong>Current Assessment's Date/Start Time:</strong></p>
            <table>
            <tr>
            <th>Assessment:</th>
            <td><input type='text' id='currentAssessment' name='Assessmentcurrent' readonly='readonly' value='' /> </td>
            </tr>
            <tr>
            <th>Date:</th>
            <td><input type='text' id='currentDate' name='Datecurrent' readonly='readonly' value='' /> </td>
            </tr>
            <tr>
            <th>Start Time:</th>
            <td><input type='text' id='currentTime' name='Timecurrent' readonly='readonly' value=''/> </td>
            </tr>
            </table>
            <div id='currentAlert'></div>

            <p><strong>New Assessment's Date/Start Time:</strong></p>
            <table>
            <tr>
            <th>Assessment:</th>
            <td><input type='text' id='newAssessment' name='Assessmentnew' readonly='readonly' value='' /> </td>
            </tr>
            <tr>
            <th>Date:</th> 
            <td><input type='text' id='newDate' name='Datenew' readonly='readonly' value='' /> </td>
            </tr>
            <tr>
            <th>Start Time:</th> 
            <td><input type='text' id='newTime' name='Timenew' readonly='readonly' value=''/><span class='timepicker_button_trigger'><img src='Images/clock.gif' alt='Choose Time' /></span> </td>
            </tr>
            </table>
            <div id='datetimeAlert'></div>

            </form>

            <p><button id='updateSubmit'>Update Date/Start Time</button></p>

            <div id='targetdiv'></div>
        ";

        echo $editsession;

CSS:

form#assessmentForm {
 float: left; 
 border: 1px solid red;
}
form#updateForm {
 float:left;
 clear: right;
 /* with some space to the left of the second form */
 margin-right: 100px; 
}
p#submitupdatebtn {
  clear: both;
}

At the moment both form are displayed above one another. What I really want to do is display $editsession form to be displayed next to the $assessmentform form on the right hand side with a little space in between the two forms.

How can this be achieved? And I want this to work in all Major browsers.

Below shows two screenshots merged together to show how I want it to be displayed:

enter image description here

Thanks

UPDATE:

Below is now what it is displaying:

enter image description here

  • 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-14T23:41:56+00:00Added an answer on June 14, 2026 at 11:41 pm

    You just need to float: left; the forms, and it is recommended to also clear: right; the second form, so that other floating elements don’t appear to the right of it. Finally, clear: both; on the <p> that follows the second form so no preceding element floats to the left or right of it.

    form {
     /* Float both forms to the left */
     float: left; 
     /* borders added for visibility. Just remove them */
     border: 1px solid red;
    }
    form#updateForm {
     clear: right;
     /* with some space to the left of the second form */
     margin-right: 20px; 
    }
    /* Give an id to the <p> which follows the second form and clear: both */
    p#submit {
      clear: both;
    }
    

    In your markup, give the <p> which follows the second form an id, so it can be easily targeted in the CSS

    <p id='submit'><button id='updateSubmit'>Update Date/Start Time</button></p>
    

    Then move it inside the preceding <form> tag, since it is a part of that form.

    Here is a demonstration

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

Sidebar

Related Questions

I'm not very strong in SQL statements but I would like to know about
Not very sure if this is the right way of asking, but I was
I'm not very expert with Perl, so I preferred to ask you. I have
i'm really not very familiar with CSS and HTMl so take it easy with
I'm not very experienced in C#, done some small stuff with it, but it's
I'm not very used to programming with flags, but I think I just found
I'm not very expert on how processors work, but one might imagine that it
I have tried my hand at some pagination but it gives me very unexpected
I think im being very silly here but here goes. I have a menu
Maybe someone have idea for perl script with very strong irregular expression that match

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.