![]() |
|
|
|
#1 |
|
I'm just wondering if this is a valid structure:
<fieldset> <legend>Please make a choice:</legend> <ul> <li><a href="add.php">Add data</a></li> <li><a href="display.php">Display data</a></li> <li><a href="edit.php">Edit data</a></li> </ul> </fieldset> Anyone? Regards, Samuël van Laere Samuël van Laere |
|
|
|
|
#2 |
|
Posts: n/a
|
"Samuël van Laere" <> wrote in message
news:gtzPb.64127$... > I'm just wondering if this is a valid structure: Where's the <form>? |
|
|
|
#3 |
|
Posts: n/a
|
"Samuël van Laere" <> wrote in news:gtzPb.64127$:
> I'm just wondering if this is a valid structure: > > <fieldset> > <legend>Please make a choice:</legend> > <ul> > <li><a href="add.php">Add data</a></li> > <li><a href="display.php">Display data</a></li> > <li><a href="edit.php">Edit data</a></li> > </ul> > </fieldset> Strange! But after enclosing with the Form element, http://www.htmlhelp.com/tools/validator/direct.html says it is valid. I don't know what you are trying to achieve so this is my best guess: <form action="..." method="post"> <div> <fieldset> <legend>Please make a choice:</legend> <input type="radio" name="data" value="add.php">Add data<br> <input type="radio" name="data" value="display.php">Display data<br> <input type="radio" name="data" value="edit.php">Edit data<br> <input type="submit" value="Send"> </fieldset> </div> </form> -- Kayode Okeyode http://www.kayodeok.co.uk/weblog/ http://www.kayodeok.btinternet.co.uk.../webdesign.htm |
|
|
|
#4 |
|
Posts: n/a
|
kayodeok <> wrote:
>> <fieldset> >> <legend>Please make a choice:</legend> <ul> >> <li><a href="add.php">Add data</a></li> >> <li><a href="display.php">Display data</a></li> >> <li><a href="edit.php">Edit data</a></li> </ul> </fieldset> > > Strange! But after enclosing with the Form element, > http://www.htmlhelp.com/tools/validator/direct.html > says it is valid. It's not that strange, and it's equally valid without any form element. Just bear in mind that "valid" only means compliance to some formal rules, see http://www.cs.tut.fi/~jkorpela/html/validation.html > I don't know what you are trying to achieve so this is my > best guess: > > <form action="..." method="post"> There's no need to guess, and no need to use a form. The markup, as given in the original question, has a simple list of links. That's the best navigational tool ever invented; forms are poor and confusing surrogates. But the fieldset markup around it, although valid (remember that this only means compliance to some formal rules, which _must_ allow a lot of nonsense in any real application), is rather illogical. There are no form fields around, and no fields are called for. If, on the other hand, you really really want the visual appearance of a fieldset and its legend, as implemented in some particular browser(s), then such markup is what you need. The appearance cannot be described in current CSS. Well, you can come pretty close I suppose, by drawing a border around the <ul> element and by using a negative margin to position the header-like text to that it appears on top of a segment of the border. But then it would probably be _too_ close a fieldset appearance to confuse the user but not close enough to please the designer! -- Yucca, http://www.cs.tut.fi/~jkorpela/ Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html |
|
|
|
#5 |
|
Posts: n/a
|
"Jukka K. Korpela" <> wrote in
news:Xns9477EB25E1381jkorpelacstutfi@193.229.0.31: >> I don't know what you are trying to achieve so this is my >> best guess: >> >> <form action="..." method="post"> > > There's no need to guess, and no need to use a form. > > The markup, as given in the original question, has a simple list > of links. That's the best navigational tool ever invented; forms > are poor and confusing surrogates. > > But the fieldset markup around it, although valid (remember that > this only means compliance to some formal rules, which _must_ > allow a lot of nonsense in any real application), is rather > illogical. There are no form fields around, and no fields are > called for. Thanks for clarifying, I assumed he was designing a form because of the presence of the the fieldset and legend element. I didn't try out his code in my browser so it wasn't immediately obvious to me that the fieldset element happens to look like a border with rounded corners and that is probably the effect he was trying to achieve... -- Kayode Okeyode http://www.kayodeok.co.uk/weblog/ http://www.kayodeok.btinternet.co.uk.../webdesign.htm |
|
|
|
#6 |
|
Posts: n/a
|
kayodeok <> wrote:
> I didn't try out his code in my browser so it wasn't immediately > obvious to me that the fieldset element happens to look like a > border with rounded corners and that is probably the effect he was > trying to achieve... The appearance of a fieldset element depends on many things, including platform. On Win98 for example, IE 6 displays it with a rectangular border. -- Yucca, http://www.cs.tut.fi/~jkorpela/ Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html |
|
|
|
#7 |
|
Posts: n/a
|
"Jukka K. Korpela" <> wrote in
news:Xns9478DF631914jkorpelacstutfi@193.229.0.31: > kayodeok <> wrote: > >> I didn't try out his code in my browser so it wasn't >> immediately obvious to me that the fieldset element happens to >> look like a border with rounded corners and that is probably >> the effect he was trying to achieve... > > The appearance of a fieldset element depends on many things, > including platform. On Win98 for example, IE 6 displays it with > a rectangular border. > I didn't know that, thanks. -- Kayode Okeyode http://www.kayodeok.co.uk/weblog/ http://www.kayodeok.btinternet.co.uk.../webdesign.htm |
|