"; 2. In the style tag pair, set "input{ width:width value;}" statement is enough."/> "; 2. In the style tag pair, set "input{ width:width value;}" statement is enough.">

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

How to modify the length of the input box in css

青灯夜游
青灯夜游Original
2021-11-10 17:28:0010658browse

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" />

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>

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!

Statement:
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