What's the Best Way to Add a Border to My Two-Column Form?

I'm currently working on a reservation form for my website with a 2-column layout. In one column, I have tables, and I've been trying to add a divider between the columns but haven't found a solution yet.

Despite researching ways to add a divider in the CSS code, I still can't get it to work properly.

Currently, I have placed the form in 'fieldset' mode with the following CSS layout:

    <style>         


    fieldset{

    background-color: #52854C;
    font-family: Georgia;
    color: white;
    border: 2px black solid; 
    -moz-border-radius: 15px;
    -webkit-border-radius: 15px;
    -khtml-border-radius:15px;
     border-radius: 15px;

    -webkit-box-shadow:inset 1px 1px 2px #999;
    -moz-box-shadow:inset 1px 1px 2px #999;
    -khtml-box-shadow:inset 1px 1px 2px #999;
     box-shadow:inset 1px 1px 2px #999;
     }



    </style>    

This is the HTML Form structure:

    <fieldset>

        <p><label>Full Address:<input type="text" id="rtstreet" name="rtstreet" style="margin:5px; width:320px; height:15px"></label></p></center>

                    <table>

                    <td><label>Airport Name:</label><input type="text" id="airport" style="width:70px; height:15px">

                    <td><label>Airline Code/Name:</label><input type="text" id="airport" style="width:45px; height:15px">

                    <td><label>Flight #:</label><input type="text" id="airport" style="width:35px; height:15px">



            </table>

           </div>


     <div style="float:right list-style:none;">

      <ul li><h1 class="lead" style="font-weight:bold; color:black;list-style:none;">Drop-Off Information</h1></ul li>

   <p><label>Full Address:<input type="text" id="rtstreet" name="rtstreet" style="margin:5px; width:320px; height:15px"></label></p></center>

                    <table>

                    <td><label>Airport Name:<input type="text" id="airport" style="width:70px; height:15px">

                    <td><label>Airline Code/Name:<input type="text" id="airport" style="width:45px; height:15px">

                    <td><label>Flight #:<input type="text" id="airport" style="width:35px; height:15px">



            </table>


    </div>  

            <br>
            <br>
           </br>
           </br>
           </fieldset>

If anyone has any advice or tips on how to solve this issue, I would greatly appreciate it!

Answer №1

When applying a border to a fieldset, it's important to specify individual IDs for the tr/td elements and apply the respective styles in CSS:

border-left
border-right
border-top
border-bottom

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

After swapping out "div" with "input" and then replacing "input" with

My goal is to create a function where a user can edit text within a div. The idea is to replace the current text with an editable input field, and then convert it back into a div after the user hits enter. I've encountered an issue while trying to im ...

Ensure that the text inside the button does not exceed its boundaries (utilizing Bootstrap v4)

My current code snippet appears below. <div class="col-xl-2 col-lg-12"> <button class="btn btn-secondary w-100" value=1>But.</button> </div> <div class="col-xl-4 col-lg-12"> <button cla ...

Tips for resolving a flickering issue that occurs when switching to an input field with our default value / placeholder plugin

In the realm of web development, numerous plugins cater to the implementation of HTML5's placeholder attribute in older browsers. The plugin we have opted for can be found here. Unlike some other alternatives, this particular plugin, with a few modif ...

Position the Bootstrap Button on the right side of the navbar

Hey there, I'm completely new to the world of HTML/CSS and this is my first project ever. I welcome any constructive criticism that can help me improve in the future. Now onto my current dilemma: I've decided to use Bootstrap because it seems u ...

Unable to modify the hover color on the image or icon

After creating a circle icon with an image in the center, I wanted to make the image change colors on hover. The main focus of the icon is the circle itself. In my attempt to achieve this effect, I included the following code for the circle icon: .circle- ...

Each time the page is refreshed, the most recent form data submitted is continually appended to an array

I have implemented a post request to add input data from a form. The entered data is stored in an array variable burg and then displayed on my index.handlebars view. Everything works as intended, but when the page is refreshed without any input in the form ...

HTML/PHP/JS - Submit Form and Upload File Simultaneously

I need to create a form with a Photo Upload Input that allows users to upload pictures before submitting the form for faster processing. The form should also support uploading multiple files, display a progress bar, and provide a preview of the uploaded im ...

Organize rows in the table while maintaining reactivity

A challenge I'm facing with a web app (Angular SPA) is that it displays a large table without the ability to sort. To work around this issue, I've managed to implement sorting via the console. However, re-inserting the rows after sorting causes t ...

Activate on click using JavaScript

When a link with the class .active is clicked, I want to use a JavaScript function to deactivate any other active links. The structure of the code should be as follows: <ul class="product"> <li><a href="#myanmar" class="active">Mya ...

Tips for utilizing jQuery or AJAX to automatically update a div every 10 seconds

Seeking assistance from fellow developers. Working on a PHP web app utilizing the Yii MVC framework and its array of tools. Specifically, I am looking to dynamically refresh a div every 10 seconds. Currently, my Ajax function looks like this: <script t ...

The mysterious workings of the parseInt() function

As I begin my journey to self-teach JavaScript using HeadFirst JavaScript, I've encountered a minor obstacle. The chapter I'm currently studying delves into handling data input in forms. The issue arises when I attempt to utilize the updateOrder( ...

Issue with HTML and CSS where the header is displayed behind the rest of the content

I'm having issues with creating a fixed header for my webpage. It seems to be hiding behind the rest of the content on the screen even though I have tried adjusting the z-index without success. Here is a snippet of my HTML code: body { m ...

Flex just can't seem to align correctly

I'm having trouble getting this to work properly. I am using React and styled components, but the justify/content alignment is not functioning as expected. The setup includes a div with flex properties, where the flex direction is set to column. With ...

What is the process for gathering information using selenium from a webpage?

Attempting to retrieve data using Selenium and Python from a website. Below is the code that has been used so far: url = 'https://www.kicker.de/1894559/spieldaten/bayern-muenchen-14/borussia-mgladbach-15' chrome = webdriver.Chrome() select = Sel ...

The el-dialog is functioning properly, however, I am looking to add CSS that will animate it to open

I've set up a dialog to open on button click, and it's functioning correctly. My goal is to have the dialog open from the bottom with a height of 300px, show the contents inside it, and then hide when I click outside or inside any element. Here ...

Using HTML and CSS to Dynamically Alter Cell Text Color Based on Value

Unfortunately, I am unable to find a straightforward solution. My goal is to adjust the text color inside my cell based on its value. Here is a basic table: <table> <tbody> <tr> <td>Quantity</td> <td> ...

Tips for dynamically populating JSON data using a dropdown selection?

I am currently exploring HTML forms as a new web developer. I have been experimenting with displaying JSON data in a div based on a selection from a dropdown menu using jQuery in Chrome. However, my code does not seem to be functioning properly. Even tho ...

Using jQuery or Javascript to enclose every character in a given string with an HTML tag

I am trying to create a function that can take a string of text and wrap each letter within that string with an HTML tag such as <i> or <span>. Although I have made some progress, the current solution is not working as expected. The issue I a ...

What could be causing my PHP code to not execute properly alongside the HTML?

I am currently sharpening my skills in PHP by working on a simple web form project. To put it simply, I need to develop a basic web form that accepts a two-dimensional array of European cities along with the distance in kilometers between each pair of citi ...

Codeception is unable to interact with an element that it recently encountered

Greetings to the wonderful users of Stackoverflow, Currently, I am in the process of creating acceptance tests using Codeception with Selenium as the WebDriver module. I have encountered an issue while trying to verify the existence and functionality of o ...