473,378 Members | 1,426 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,378 software developers and data experts.

width: enough;?

I can't seem to figure out how to specify that the width of a block should
be "enough". For example, I've got a form on a page. With styles, I've given
the form a background and a border. It takes up 100% of the width of the
viewport. If the labels and controls are narrow, I've got a great light gray
expanse on the right side of the form.

If I set the width explicitly to some number of ems or some percentage, it
forces the form's content to wrap. I could add styles to prevent the
wrapping, but if someone uses a narrow screen then I *do* want the contents
to wrap. In other words, I want the screen's dimensions to cause wrapping,
but not the form's dimensions. On the contrary, I want the form to respect
its content.

Your guidance?

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.

Jul 20 '05 #1
8 1780
in post: <news:bv************@ID-114100.news.uni-berlin.de>
"Harlan Messinger" <h.*********@comcast.net> said:
I can't seem to figure out how to specify that the width of a block should
be "enough". For example, I've got a form on a page. With styles, I've given
the form a background and a border. It takes up 100% of the width of the
viewport. If the labels and controls are narrow, I've got a great light gray
expanse on the right side of the form.


URL?
--
brucie - i usenet nude
Jul 20 '05 #2
brucie <sh**@bruciesusenetshit.info> wrote:
in post: <news:bv************@ID-114100.news.uni-berlin.de>
"Harlan Messinger" <h.*********@comcast.net> said:
I can't seem to figure out how to specify that the width of a block should
be "enough". For example, I've got a form on a page. With styles, I've given
the form a background and a border. It takes up 100% of the width of the
viewport. If the labels and controls are narrow, I've got a great light gray
expanse on the right side of the form.


URL?


http://gavelcade.com/form.asp, which validates Strict.

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #3
Harlan Messinger wrote:
brucie <sh**@bruciesusenetshit.info> wrote:

in post: <news:bv************@ID-114100.news.uni-berlin.de>
"Harlan Messinger" <h.*********@comcast.net> said:

I can't seem to figure out how to specify that the width of a block should
be "enough". For example, I've got a form on a page. With styles, I've given
the form a background and a border. It takes up 100% of the width of the
viewport. If the labels and controls are narrow, I've got a great light gray
expanse on the right side of the form.


URL?

http://gavelcade.com/form.asp, which validates Strict.


Can you float it? That seems to work (FB 0.7, IE 6, Op 7.23) though I
have to confess to not knowing why, despite feeling this will be quite
obvious.

--
Michael
m r o z a t u k g a t e w a y d o t n e t
Jul 20 '05 #4
Harlan Messinger <hm*******************@comcast.net> wrote:
brucie <sh**@bruciesusenetshit.info> wrote:
in post: <news:bv************@ID-114100.news.uni-berlin.de>
"Harlan Messinger" <h.*********@comcast.net> said:
I can't seem to figure out how to specify that the width of a block should
be "enough". For example, I've got a form on a page. With styles, I've given
the form a background and a border. It takes up 100% of the width of the
viewport. If the labels and controls are narrow, I've got a great light gray
expanse on the right side of the form.


URL?


http://gavelcade.com/form.asp, which validates Strict.


form {display: inline-block;}

table or table-cell would do just as well as inline-block.

However, none of the above values are supported by IE.

form {max-width: 20em; }
works well in better browsers (Opera, Mozilla, etc.), but has no
effect in IE.

A slight modification
form {width: 20em; max-width: 20em; }
body>form {width: auto;}
works just as well in better browsers, but causes horizontal scrolling
instead of wrapping at smaller window sizes in, guess what, IE.

So many ways of doing this, but IE is just useless. :-(

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #5
Michael Rozdoba <mr**@nowhere.invalid> wrote:
Harlan Messinger wrote:
brucie <sh**@bruciesusenetshit.info> wrote:

in post: <news:bv************@ID-114100.news.uni-berlin.de>
"Harlan Messinger" <h.*********@comcast.net> said:
I can't seem to figure out how to specify that the width of a block should
be "enough". For example, I've got a form on a page. With styles, I've given
the form a background and a border. It takes up 100% of the width of the
viewport. If the labels and controls are narrow, I've got a great light gray
expanse on the right side of the form.

URL?

http://gavelcade.com/form.asp, which validates Strict.


Can you float it? That seems to work (FB 0.7, IE 6, Op 7.23) though I
have to confess to not knowing why, despite feeling this will be quite
obvious.


I thought of that, and it'll certainly work, except that the next
block on the page will always have to clear it, and that seems like a
hack that shouldn't be necessary.

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #6
Harlan Messinger <hm*******************@comcast.net> wrote:
Michael Rozdoba <mr**@nowhere.invalid> wrote:
"Harlan Messinger" <h.*********@comcast.net> wrote:

>I can't seem to figure out how to specify that the width of a block should
>be "enough". For example, I've got a form on a page. With styles, I've given
>the form a background and a border. It takes up 100% of the width of the
>viewport. If the labels and controls are narrow, I've got a great light gray
>expanse on the right side of the form.

Can you float it? That seems to work (FB 0.7, IE 6, Op 7.23) though I
have to confess to not knowing why, despite feeling this will be quite
obvious.


I thought of that, and it'll certainly work, except that the next
block on the page will always have to clear it, and that seems like a
hack that shouldn't be necessary.


It may or may not matter to you, but under CSS 2 rules a floated
element must have a specified width. Under CSS 2.1 the width becomes
optional (and browser already act along these lines).

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #7
On Sat, 31 Jan 2004 21:07:26 +0000, Steve Pugh <st***@pugh.net> wrote:
[...]
It may or may not matter to you, but under CSS 2 rules a floated
element must have a specified width. Under CSS 2.1 the width becomes
optional (and browser already act along these lines).


Except for MacIE5. If a float without a width contains another block,
MacIE5 will give it a width of 100% of the container.

Nick

--
Nick Theodorakis
ni**************@hotmail.com
nicholas_theodorakis [at] urmc [dot] rochester [dot] edu
Jul 20 '05 #8
Steve Pugh wrote:

It may or may not matter to you, but under CSS 2 rules a floated
element must have a specified width. Under CSS 2.1 the width
becomes optional (and browser already act along these lines).


Except for IE 5/Mac, which stubbornly sticks to the 2.0 rule. ;-)

--
Brian (follow directions in my address to email me)
http://www.tsmchughs.com/

Jul 20 '05 #9

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

Similar topics

179
by: SoloCDM | last post by:
How do I keep my entire web page at a fixed width? ********************************************************************* Signed, SoloCDM
5
by: Andrew | last post by:
Could someone please tell me why this simple table test is completely mangled by Netscape? HTML: <TABLE WIDTH="90%" ALIGN="center" BORDER="0" CELLPADDING="0" CELLSPACING="1" BGCOLOR="Black">...
2
by: Stephen Weatherly | last post by:
Could anyone please help me with a problem I am having with my table widths??? If I have 2 images within a td tag, but using CSS relative positioning I position one over the top of the second (I...
1
by: Glabbeek | last post by:
I'm changing the layout of my site. Instead of using tables, I will use DIVs. It's working fine, except for 1 thing: In IE6 some DIVs are not the correct width. Mozilla and Opera are showing the...
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,...
28
by: ryanhokanson | last post by:
I was just trying to get a list of all my reports along with their widths. I can't use the "Reports" collection because it only works on open reports. So I tried looking into the "AllReports"...
7
by: lambertb | last post by:
Hi, is this possible to achieve this, and how? http://img217.imageshack.us/img217/779/derrrvw2.png thanks!
7
by: Terry | last post by:
Hi again folks. I have a couple of issues now. I am not sure why I can't get my menu to overlap the content area. I tried using z-index. The effect I want occurs in Firefox but not IE. ...
22
Atli
by: Atli | last post by:
Hi. I'm setting up a small photo-album-type thing, where I use PHP to set up a list of images for visitors to click through. That's all simple enough. However, I'm having a weird bug in IE8. ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.