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

CSS Forms

Hi all

I'm having a problem with a form layout in CSS, based on Eric Meyer's
technique (as found on ALA). FireFox and IE show this page correctly,
but Opera as well as Safari show way too much white space at the top
of the form. I have been trying for a few hours to get this right, but
no luck so far. Can anyone give me a hint on how to solve this issue?

URL: http://www.statik.be/misc/reli/

Thanks in advance!

DK
Jul 21 '05 #1
8 2671


Der Kommissar wrote:

I'm having a problem with a form layout in CSS, based on Eric Meyer's
technique (as found on ALA). FireFox and IE show this page correctly,
but Opera as well as Safari show way too much white space at the top
of the form. I have been trying for a few hours to get this right, but
no luck so far. Can anyone give me a hint on how to solve this issue?

URL: http://www.statik.be/misc/reli/


It is that ul in the left-navigation div that is floated too and somehow
with Opera the floated form controls end up below the floated ul,
possibly due to the clear: both.

If you change the rule to

div.form-row
{
clear: right;
padding-top: 2px;
}

then I think both Opera and Mozilla render it the way you want. I don't
have Safari to test, maybe you can report back to the group whether it
works that way with Safari too.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 21 '05 #2
Martin Honnen wrote:


Der Kommissar wrote:

I'm having a problem with a form layout in CSS
<snip>
URL: http://www.statik.be/misc/reli/

It is that ul in the left-navigation div that is floated too and somehow
with Opera the floated form controls end up below the floated ul,
possibly due to the clear: both.

If you change the rule to

div.form-row
{
clear: right;
padding-top: 2px;
}

then I think both Opera and Mozilla render it the way you want. I don't
have Safari to test, maybe you can report back to the group whether it
works that way with Safari too.


Thanks, that did the trick in Opera! Unfortunately, the layout in Safari
is still messed up, it shows a LOT of white space, much more than the
length of the menu UL at the left. I have been playing with the CSS some
more, but to no avail. Can anyone with Safari and some CSS skills help
me out here? I updated the CSS file at the address to reflect the
changes I made. The address still is http://www.statik.be/misc/reli/ .

Thanks again for the help, Martin!

DK
Jul 21 '05 #3
Der Kommissar wrote:
Martin Honnen wrote:

Der Kommissar wrote:
I'm having a problem with a form layout in CSS
URL: http://www.statik.be/misc/reli/
If you change the rule to
div.form-row { clear: right; }

then I think both Opera and Mozilla render it the way you want.


At enlarged text sizes, clear:right doesn't always clear the label for
the previous row, especially when a label wraps to 2 lines. It looks
messy, not to mention confusing. Forms are (arguably) tabular data, so a
table may be the better solution in this case.
layout in Safari is still messed up, it shows a LOT of white space


I have Safari 1.0 v85 handy and see what you mean. The margin (top)
property on h2 seems to be the trigger, though the actual cause could be
the floats, clears, the -10000px absolutely positioned elements, or some
combination thereof. Who knows?

h1, h2, h3, h4, h5, h6 {... margin: 0 0 5px 0; ...}

Changing the margin-top from 0 to 1px, specifically on h2, returns
spacing to normal, at least in this particular case. Using table markup
also seems to do the trick. I don't know what other Safari versions will
do, though.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jul 21 '05 #4
Der Kommissar <de***********@invalid.invalid> wrote:
Unfortunately, the layout in Safari
is still messed up, it shows a LOT of white space, much more than the
length of the menu UL at the left. I have been playing with the CSS some
more, but to no avail. Can anyone with Safari and some CSS skills help
me out here? I updated the CSS file at the address to reflect the
changes I made. The address still is http://www.statik.be/misc/reli/ .


get rid of that apology in the #header.

--
marco
Jul 21 '05 #5
kchayka wrote:
Der Kommissar wrote:
Martin Honnen wrote:
Der Kommissar wrote:
I'm having a problem with a form layout in CSS
URL: http://www.statik.be/misc/reli/

If you change the rule to
div.form-row { clear: right; }

then I think both Opera and Mozilla render it the way you want.

At enlarged text sizes, clear:right doesn't always clear the label for
the previous row, especially when a label wraps to 2 lines. It looks
messy, not to mention confusing. Forms are (arguably) tabular data, so a
table may be the better solution in this case.

layout in Safari is still messed up, it shows a LOT of white space

I have Safari 1.0 v85 handy and see what you mean. The margin (top)
property on h2 seems to be the trigger, though the actual cause could be
the floats, clears, the -10000px absolutely positioned elements, or some
combination thereof. Who knows?

h1, h2, h3, h4, h5, h6 {... margin: 0 0 5px 0; ...}

Changing the margin-top from 0 to 1px, specifically on h2, returns
spacing to normal, at least in this particular case. Using table markup
also seems to do the trick. I don't know what other Safari versions will
do, though.


That did the trick, thanks a lot! The cause is not the -10000px, as was
my first idea, because removing it unfortunately didn't help. I'll solve
it by using your suggestion for the time being, until a similar problem
comes up. Thanks again!
Jul 21 '05 #6
Marco Bakker wrote:
Der Kommissar <de***********@invalid.invalid> wrote:

Unfortunately, the layout in Safari
is still messed up, it shows a LOT of white space, much more than the
length of the menu UL at the left. I have been playing with the CSS some
more, but to no avail. Can anyone with Safari and some CSS skills help
me out here? I updated the CSS file at the address to reflect the
changes I made. The address still is http://www.statik.be/misc/reli/ .

get rid of that apology in the #header.


That doesn't solve the problem, but kchayka's solution did, so all is
fine. Thanks anyway.
Jul 21 '05 #7
Der Kommissar <de***********@invalid.invalid> wrote:
Marco Bakker wrote:
Der Kommissar <de***********@invalid.invalid> wrote:

Unfortunately, the layout in Safari
is still messed up, it shows a LOT of white space, much more than the
length of the menu UL at the left. I have been playing with the CSS some
more, but to no avail. Can anyone with Safari and some CSS skills help
me out here? I updated the CSS file at the address to reflect the
changes I made. The address still is http://www.statik.be/misc/reli/ .

get rid of that apology in the #header.


That doesn't solve the problem, but kchayka's solution did, so all is
fine. Thanks anyway.


I see. This morning I checked and it wasn't solved. Now it is :-)

--
marco
Jul 21 '05 #8
Der Kommissar wrote:
kchayka wrote:
Der Kommissar wrote:
Martin Honnen wrote:
Der Kommissar wrote:

>URL: http://www.statik.be/misc/reli/

div.form-row { clear: right; }


At enlarged text sizes, clear:right doesn't always clear the label for
the previous row, especially when a label wraps to 2 lines. It looks
messy, not to mention confusing.


You might have addressed the Safari spacing issue, but this problem
remains. At enlarged text sizes, usability is rather impaired, methinks.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jul 21 '05 #9

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

Similar topics

19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
3
by: Joshua Russell | last post by:
Hi, Both the methods below open up a windows form called MasterForm. However, one works better than the other. Method 1 opens the form correctly but I don't have any reference to the instance of...
7
by: Mike Bulava | last post by:
I have created a base form that I plan to use throughout my application let call the form form1. I have Built the project then add another form that inherits from form1, I add a few panel controls...
13
by: MD | last post by:
I have been converting a program from VB6 to VB.Net and enhancing it as well. All has been progressing OK although its been hard work. Now, all of a sudden, when I try to execute a ShowDialog()...
15
by: Joshua Kendall | last post by:
I have a script in which it keeps opening the same form instead of only one instance. I also need help with a form that has a password. Where do I put the actual password? can I use a database for...
3
by: Lloyd Sheen | last post by:
I have the following situation: Need a user resizable user control. After much trying with user control I came across the idea of hosting the controls in a form marked as not TopLevel = false. ...
8
by: Stephen Rice | last post by:
Hi, I have a periodic problem which I am having a real time trying to sort. Background: An MDI VB app with a DB on SQL 2000. I have wrapped all the DB access into an object which spawns a...
3
by: Geraldine Hobley | last post by:
Hello, In my project I am inheriting several forms. However when I inherit from a form and add additional subroutines and methods to my inherited form I get all sorts of problems. e.g. I sometimes...
6
by: dbuchanan | last post by:
I have a Windows Forms application that accesses SQL Server 2k from a small local network. The application has been used for weeks on other systmes but a new install on a new machine retruns...
21
by: Dan Tallent | last post by:
In my application I have a form (Customer) that I want to be able to open multiple copies at once. Within this form I have other forms that can be opened. Example: ZipCode. When the user enters...
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...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.