473,385 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

width of textarea (not 100%) in firefox

Hi,

On http://www.cyl.nl/tips/index.html you see a textarea. In firefox the
textarea falls over the border of the form, in internet explorer it fits
exactly into the form. Any idea how to get the appearance in firefox the
same?

kind regards,

Roderik
Jul 21 '05 #1
3 9779
Roderik <ma**@roderik.net> wrote:
On http://www.cyl.nl/tips/index.html you see a textarea. In firefox the
textarea falls over the border of the form, in internet explorer it fits
exactly into the form. Any idea how to get the appearance in firefox the
same?


IE and Opera 7 get this wrong. In the css box model width=100% refers to
the content excluding borders, padding and margin. Browsers auto
generate borders for form elements, hence it spills over its container.

CSS3 may offer 2 different box models via the box-sizing property, Moz
currently supports a preliminary implementation of this via the
proprietary -moz-box-sizing:border-box

Adding that to the form element should fix it.

--
Spartanicus
Jul 21 '05 #2
Spartanicus wrote:
Roderik <ma**@roderik.net> wrote:

On http://www.cyl.nl/tips/index.html you see a textarea. In firefox the
textarea falls over the border of the form, in internet explorer it fits
exactly into the form. Any idea how to get the appearance in firefox the
same?

IE and Opera 7 get this wrong. In the css box model width=100% refers to
the content excluding borders, padding and margin. Browsers auto
generate borders for form elements, hence it spills over its container.

CSS3 may offer 2 different box models via the box-sizing property, Moz
currently supports a preliminary implementation of this via the
proprietary -moz-box-sizing:border-box

Adding that to the form element should fix it.


Wow, it works! Is it possible in CSS2 to give a width of 100% minus 4px
or something, because these problems arise quite often.
Jul 21 '05 #3
Roderik <ma**@roderik.net> wrote:
Is it possible in CSS2 to give a width of 100% minus 4px
No.
because these problems arise quite often.


It isn't an issue for block level elements if the (default) value of
"auto" is used for the width property. Form elements are a strange breed
of animal, they are not inline, block, nor do they behave as shrink
wrapping elements. Browser rendering with regard to css box model
compliance varies wildly.

--
Spartanicus
Jul 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Phil Powell | last post by:
The customer made a wild request: they want on their admin panel a textarea that will display an existing resume. This textarea, however, must have a dynamic width, one that "fills the screen...
8
by: BiNZGi | last post by:
Hi I have reduced the problem to this code: <form> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td><input type="text" style="width: 100%;" value="Lorem ipsum dolor...
3
by: phil_gg04 | last post by:
Dear CSS Experts, I want to make a textarea fill all the available width. This is something I've done before but mostly by trial and error; now I want to understand what is going on. So I try:...
3
by: Phil Powell | last post by:
<script type="text/javascript"> <!-- function getWinWidth() { isNav = (document.all) ? false : true; isIE = (document.all) ? true : false; if (isNav && !isIE) return(window.innerWidth); else...
2
by: Stewart | last post by:
Originally posted in comp.lang.javascript: Newsgroups: comp.lang.javascript From: "Stewart" Date: 23 Aug 2005 02:50:04 -0700 Local: Tues, Aug 23 2005 10:50 am Subject: FireFox, RemoveChild,...
3
by: honcho | last post by:
Hello: When my web application is invoked by Firefox the height and width information is passed to Internet Explorer but not to Firefox. The ASP.NET control is <asp:textbox id="tbxNote"...
1
by: Shadow Lynx | last post by:
Consider this simple HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 STRICT//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head>...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.