[UPHPU] CSS: Inline Form

justin justin at justinhileman.info
Mon Jul 9 11:09:34 MDT 2007


On 7/9/07, Justin Giboney <giboney at giboneydesigns.com> wrote:
> That worked. Thank you.
>
> Justin Giboney
>
>
>
> On Jul 9, 2007, at 10:25 AM, Rusty Keele wrote:
>
> > How about using the display property on the form, like this:
> >
> >
> > <a href="">Espa&ntilde;ol</a>
> > <form action="search.php" style='display:inline;'>
> >   <input type="text" name="search" size="15" />
> >   <input type="submit" value="Search">
> > </form>
> >


that works but is a bad habit to get into... making your form appear
inline is a style issue not a functionality issue, so it shouldn't be
mixed in with the markup. try:

<form id="search" action="search.php">
    <input type="text" name="search" size="15" />
    <input type="submit" value="Search">
</form>

then add "#search { display: inline; }" to your stylesheet. this also
gives you the added bonus of being able to select your form (and the
elements in it) for other styling later.



this one's a whole 'nother problem...

<div>
<li><a href="products.php">Products</a>
</div>

that's not even going to validate as HTML 4 transitional. you're
probly looking for something more like:

<ul>
<li><a href="products.php">Products</a></li>
</ul>



justin
-- 
http://justinhileman.info


More information about the UPHPU mailing list