Wednesday, November 3, 2021

Stacked Forms

 Stacked Forms Code

 


<!DOCTYPE html>

<html>

    <head>

        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

        <meta name="viewport" content="width=device-width, initial-scale=1.0">

         <link rel="STYLESHEET"type="text/css"href="web.css">

        <title>web design</title>

    </head>

    <body>

        <h3>Stacked Forms</h3>

        <p>how to use CSS a create Stacked forms</p>

        <div class="container">

            <form>

                <label for="fname">You Name</label>

                <input type="text"id="fname"placeholder="You name">

                <label for="lname">Last Name</label>

                <input type="text"id="lname"placeholder="You Last name">

                <label for="country">Country</label>

                <select id="country">

                    <option value="pakistan">pakistan</option>

                    <option value="usa">usa</option>

                    <option value="india">india</option>

                </select>

                <input type="submit"value="submit">

            </form>

        </div>

 </body>

</html>


CSS Stacked Forms Style

body{

    font-family: Arial, Helvetica, sans-serif;

}

input[type=text],select{

    width:100%;

    padding:12px 20px;

    margin:8px 0;

    display: block;

    border: 2px solid #ccc;

    border-radius:4px;

      box-sizing:border-box ;

}

input[type=submit]{

    width:100%;

    background-color: green;

    padding:14px 20px;

    color: #fff;

    margin: 8px 0;

    border-radius:4px;

    cursor: pointer;

}

input[type=submit]:hover{

    background-color: greenyellow;

}

.container{

    border-radius: 5px;

    background-color:#f2f2f2;

    padding:20px ;

}

No comments:

Post a Comment

JavaScript Animated

  JavaScript Animated <!DOCTYPE html> <html> <style> #myContainer {   width: 400px;   height: 400px;   position: relative;...