Home > Web Front-end > CSS Tutorial > How to modify the length of the input box in css

How to modify the length of the input box in css

青灯夜游
Release: 2021-11-10 17:28:00
Original
10687 people have browsed it

How to modify the length of the input box in css: 1. Use the style attribute to set the width style in the input tag, with the syntax ""; 2. In the style To align the label, set the "input{width:width value;}" statement.

How to modify the length of the input box in css

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

How to modify the input box length in css

Method 1:

Use the style attribute to Add width style to input tag.

<input type="text" /><br /><br />
<input type="text" style="width: 300px" />
Copy after login

How to modify the length of the input box in css

Method 2:

<!DOCTYPE html>
<html>
	<head>
		<style>
			.input {width: 100px;}
		</style>
	</head>
	<body>
		<input type="text" /><br /><br />
		<input type="text" class="input" />
	</body>
</html>
Copy after login

How to modify the length of the input box in css

(Learning video sharing: css video tutorial)

The above is the detailed content of How to modify the length of the input box in css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template