There are two input tags placed on one line. How to implement the adaptive width of the Input on the left and the fixed width on the right. _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:19:18
Original
1792 people have browsed it

In fact, the input width on the left needs to be 100%-30, and the width on the right is always 30


Reply to the discussion (solution)

js can do it, I don’t know css

I did it myself:

<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>input type="file"</title>	<style type="text/css">		body{ font-size:14px;}		input{ vertical-align:middle; margin:0; padding:0}		.file-box{width:100%}		.txt{ position:absolute; height:22px; border:1px solid #cdcdcd;left:10px;right:100px}		.btn{ position:absolute; background-color:#FFF; border:1px solid #CDCDCD;height:24px; width:70px;right:20px}			</style></head><body>	<div class="file-box">		<form action="" method="post" enctype="multipart/form-data">	 		<input type='text' name='textfield' id='textfield' class='txt' />	 		<input type='button' class='btn'   value='浏览' />	    		    		    	 	    		    			 		 	  	</form>	</div></body></htm>
Copy after login

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