Found 1594 Articles for CSS

How to create a responsive navigation menu with a login form inside of it with HTML and CSS?

AmitDiwan
Updated on 06-May-2020 13:14:18

519 Views

To create a responsive navigation menu with a login form inside of it, the code is as follows −Example Live Demo Document    body {       margin: 0px;       margin-top: 10px;       padding: 0px;    }    nav {       width: 100%;       background-color: rgb(39, 39, 39);       overflow: auto;       height: auto;    }    .links {       display: inline-block;       text-align: center;       padding: 14px;       color: rgb(178, 137, 253);     ... Read More

How to create a navigation menu with an input field inside of it?

AmitDiwan
Updated on 08-Dec-2023 15:05:10

537 Views

On a web page, you may need to place an input field on a navigation menu. Such input field can be used as a search box for the users to search anything on the website. To place the search input field on the right, use the float CSS property and set it to the right value. Create a navigation menu The element is used to create a menu on a web page. The menu links are set using the element − Home Login Register Contact Us More Info ... Read More

How to create a full screen search box with CSS and JavaScript?

AmitDiwan
Updated on 08-Apr-2020 11:08:47

616 Views

Following is the code to create a full screen search box with CSS and JavaScript −Example Live Demo body {    font-family: Arial; } * {    box-sizing: border-box; } .showBtn {    background: #008b0c;    border: none;    color:white;    padding: 10px 15px;    font-size: 20px;    cursor: pointer;    opacity: 0.8; } .showBtn:hover {    opacity: 1; } .overlaySearch {    height: 100%;    width: 100%;    display: none;    position: fixed;    z-index: 1;    top: 0;    left: 0;    background-color: rgba(132, 150, 155, 0.747); } .searchBar {    position: relative;    top: ... Read More

How to create an animated search form with CSS?

AmitDiwan
Updated on 14-Dec-2023 15:08:07

281 Views

A lot of websites these days have an animate search box on the home page itself. On placing the mouse cursor within the search box, the search box width increases to make it easier for users to search. Let us see how to create such animated search form with HTML and CSS. Create the search form Use the element and place the input type text in it. Do not forget to mention an apt placeholder for the users to understand the purpose of the textbox − Search: Style ... Read More

How to clear an input field on focus with CSS?

AmitDiwan
Updated on 16-Nov-2023 15:34:07

2K+ Views

To clear an input field, first create an input filed. To clear, use the onfocus attribute. Let us see with two examples. Create an Input Field First, use the input type to create an input field in a form on a web page − Clear the Input Field on Focus To clear the input field, use the onfocus attribute. Clear an Input Field on Focus The following is the code to clear an input field on focus − Clearing an input field on focus example Click on the above field to clear its value Clear Input Fields Let us see an ... Read More

How to create a responsive inline form with CSS?

AmitDiwan
Updated on 08-Dec-2023 16:53:28

3K+ Views

A responsive inline form is a form in which all the elements are inline, aligned on the left, with the specific labels. To display the responsiveness i.e., when the web browser is resized, we have set the inline form to stack all the input fields on top of each other. This concept works on smaller screens. Let us see how to create a responsiveness inline form with CSS. Create a form To create a form, use the element. We have set two input fields and a button in our form − Email: ... Read More

How to create a responsive form with CSS?

AmitDiwan
Updated on 03-Oct-2024 15:38:26

5K+ Views

To create a responsive form with CSS, we will be using HTML form elements such as HTML input tag with type attribute and label. We will design the created form using CSS properties and make it responsive using media queries. We will be undersatanding stepwise process of creating responsive form with css. In this article, we are having form elements and our task is to create a responsive form with CSS. Steps To Create a Responsive Form We will be following below mentioned steps to create a responsive form. Creating Structure of Form Using ... Read More

How to create a stacked form with CSS?

AmitDiwan
Updated on 14-Dec-2023 12:12:23

1K+ Views

In a stacked form, the input fields, labels and buttons are stacked on top of each other. When the web page with a form is opened on different devices, then it stacks. A form is created on a web page using the element. Let us see how to create a stacked form with CSS. Create a form The form on a web page is created using the element. The input fields include input type text, password, and repeat password. With that, the signin and register buttons are also positioned − Email ... Read More

How to create an email newsletter with CSS?

AmitDiwan
Updated on 14-Dec-2023 15:21:50

215 Views

A form that includes the details to subscribe to an email newsletter, includes the name and email-address input fields. With that, a checkbox to subscribe for the daily newsletter can also be created for the users. Also, a button to subscribe to the newsletter can also be seen. We will see here how to design an email newsletter form with HTML and CSS. Create a form and set the input fields A form is created using the . The name, email address, and checkbox fields are set in the form. Also, the submit button is also set inside the form ... Read More

How to create a form with icons using CSS?

AmitDiwan
Updated on 08-Apr-2020 09:31:29

737 Views

Following is the code to create a form with icons −Example Live Demo body {    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } * {    box-sizing: border-box; } h1 {    text-align: center; } form {    max-width: 500px;    margin: auto; } .fieldContainer {    display: flex;    width: 100%;    margin-bottom: 15px; } .icon {    font-size: 30px;    padding: 10px;    background: rgb(11, 9, 116);    color: white;    min-width: 50px;    text-align: center; } .field {    font-size: 20px;    width: 100%;    padding: 10px;    outline: none; } .field:focus {    border: 2px solid dodgerblue; } .btn {    font-size: 24px;    background-color: rgb(20, 60, 170);    color: white;    padding: 15px 20px;    border: none;    cursor: pointer;    width: 100%;    opacity: 0.9;    border-radius: 8px; } .btn:hover {    opacity: 1; } Register Form Example Register OutputThis will produce the following output −

Advertisements