[wp-hackers] Edit window expansion.

Jamie Talbot wphackers at jamietalbot.com
Wed Dec 1 12:30:04 UTC 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

C. Gardella wrote:
| Yes I am using IE my apologies. Do you mean adding the width
| properties to the form element in the wp-admin css? I did this, added
| width:100% to the form input element, and the window expands much less
| now. At least it remains scrollable. Not quite sure what you mean by
| setting the width then using 100%? where do I put the dummy tag?
| Sorry, it's early. :)

Yes, I meant CSS attributes.  Ok, say you have a search form something like:

<form action="search.php" method="post" id="search">
<h2><label for="q">Search blog</label></h2>
<p>
<input type="text" name="q" id="q" maxlength="255" class="textbox"
value="" style="width: 85%" />
<input type="submit" value="go" class="button" /></p>
</form>

and maybe the box shoots out sideways when you start typing into it?  I
think it's because you've given the input box some sort of CSS
percentage width attribute, which IE messes up.  You can see an example
in the search box at the top of http://www.clagnut.com if I remember
right.  Is this the kind of problem you're trying to fix?

You don't actually need a dummy div to fix it.  Instead, give the 85%
width attribute to the containing form and give the form elements a
width of 100%.  This seems to cure IE's problems, at least in IE6
(untested in others).

so the above changes to:

<form action="search.php" method="post" id="search" style="width: 85%">
<h2><label for="q">Search blog</label></h2>
<p>
<input type="text" name="q" id="q" maxlength="255" class="textbox"
value="" style="width: 100%" />
<input type="submit" value="go" class="button" /></p>
</form>

(Look at the style attributes for the differences).  Obviously you'd
change the style info in the CSS file instead, this is just here as an
example.

Hope that's clear enough!  If it's not, I'll knock up a demo page. :)

Cheers,

Jamie.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBrblLrovxfShShFARAr2uAJ4yhIHVkPhLVNeArCWNDhQUrQ7XCACfV/la
O/KSIWneiacc2mM1nlTD5nU=
=CcUy
-----END PGP SIGNATURE-----




More information about the hackers mailing list