|
Posted by Steve Pugh on 12/12/06 09:36
Christoph wrote:
> I have a form that looks something like this:
>
> <form>
> <fieldset>
> <div><label>blah</blah><input type="blah"></div>
> <div><label>blah</blah><input type="blah"></div>
> <div><label>blah</blah><input type="blah"></div>
> <div><label>blah</blah><input type="blah"></div>
> </fieldset>
> </form>
Does the actual page contain the same errors that this sample does?
Post a URL not snippets of code, how do we know whether what you
describe is due to the errors we can see or something elsewhere in your
HTML or CSS. From the above we can't even see if you're triggering
quirks mode or standards mode.
> When tabbing between form elements, it focus doesn't actually go to the
> next/previous element.
In which browsers?
> What's happening is that focus is going to the div.
Or perhaps, to the label?
> When I hit the [TAB] key from a form element, the DIV is highlighted with a
> border. I have to hit [TAB] again to actually get to the next form element.
> I've tried to set tab-index: none in various places but that didn't seem to
> work. I tried:
>
> BODY { tab-index: none; }
The tab-index property in CSS 3 is not yet widely supported by browsers
and should not be relied on. none is not an allowed value for it
anyway.
> How can I make it so that the DIVs are not given focus in the form? That
> only the actual form elements get focus when tabbed to/from?
Show us the actual code.
With the code corrected (adding required attributes and elements,
fixing broken label elements) I don't get the behaviour you desribe in
IE7, FireFox 1.5 or Opera 9.
Steve
Navigation:
[Reply to this message]
|