如何让textarea占满div的宽度?_html/css_WEB-ITnose
1 |
|
回复讨论(解决方案)
不太明白楼主的意思?
不就是 width 100%吗?
把 rows="6" cols="80"删掉~·然后通过样式给宽度
大家最好在浏览器中看看效果,rows="6" cols="80"本来就没写,虽是100%宽度,但实际占的宽度超出了800px,不知道为什么???
用firebug看一下就一目了然了。
大家最好在浏览器中看看效果,rows="6" cols="80"本来就没写,虽是100%宽度,但实际占的宽度超出了800px,不知道为什么???
红色部分那是什么?
引用 3 楼 的回复:
大家最好在浏览器中看看效果,rows="6" cols="80"本来就没写,虽是100%宽度,但实际占的宽度超出了800px,不知道为什么???
抬杠啊,我是说去掉也没用的,你试试看吧~~~
用firebug看一下就一目了然了。
不想再安装firefox了,也没用过firebug,能说明一下如何处理吗?谢谢啦哈~~~~
你没有定义通用样式,你加上这段代码
*{ margin:0; padding:0;}
并且textarea默认室友边框的,它也占据宽度,定义
textarea{ border:none;}
问题就解决了,楼主可以试下,反正我测试的是没有问题的。
你没有定义通用样式,你加上这段代码
*{ margin:0; padding:0;}
并且textarea默认室友边框的,它也占据宽度,定义
textarea{ border:none;}
问题就解决了,楼主可以试下,反正我测试的是没有问题的。
O(∩_∩)O谢谢帮助~~~,确是 border 及 margin 的问题~~~

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

This article explains the HTML5 <time> element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

The article discusses the <iframe> tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.
