Actually, that's not a javascript issue but a CSS one. body > .dialog or body > .panel you will see in iui.css means first child of <body> After that, you'll find .panel > fieldset , fieldset > .row, .panel > h2, … which means first child also right after body
So, the structur supported by iUI could be reproduce like this
body
+ whatever you want (div, form, p, ul, …) .panel (or .dialog, .toolbar, …)
+ h2
+ fieldset
+ div.row
+ label
+ input
The structur you propose is the following
body
+ whatever you want (div, form, p, ul, …) .panel (or .dialog, .toolbar, …)
+ form
+ h2
+ fieldset
+ div.row
+ label
+ input
which can't work, at least if you don't change 80% of the CSS code or core iUI
styles.
But yes, if you do this 80% of code modification, it should work :-)
Remi
Le 28 nov. 2009 à 18:48, lictor4 a écrit :
> Better? Yes but...
> My issue is that I need to keep that extra div surrounding the current
> view. My site is php generated so there is a lot of different pages
> and view so the extra div simplifies a lot of things but also this one
> negative side affect.
>
> I'm sure there is a way to have both, I'm just not very great at
> javascript yet...
>
> Thanks again for any help with this,
> Swj
>
> Remi Grumeau wrote:
>> better ?
>>
>> <body>
>> <div class="toolbar">
>> <h1 id="pageTitle"></h1>
>> <a id="backButton" class="button" href="#"></a>
>> <a class="button" href="#searchForm">Search</a>
>> </div>
>>
>> <form method="post" action="/mail/167048/txtnow_s/"
>> id="/167048/txtnow/" title="Send Message" class="page" selected="true">
>> <h2>Send Text Message</h2>
>> <fieldset>
>> <div class="row">
>> <label>Message:</label>
>> <input size="15" maxlength="155" format="text"
>> value="" name="d"/>
>> </div>
>>
>> <div class="row">
>> <label>Your 10 digit mobile number:</label>
>> <input size="15" maxlength="10"
>> style="-wap-input-format: "10N" " format="text" name="c_zip"
>> value="1234564323"/>
>> </div>
>> </fieldset>
>> <input type="submit" accesskey="1" value="Send"/>
>> </form>
>>
>>
>> Remi
>>
>> Le 27 nov. 2009 à 17:48, lictor4 a écrit :
>>
>>> Hi
>>> I having trouble getting my site to display in full width like the iUI
>>> examples. The <li> don't display all the way to the left and
>>> everything seems to be centered a bit to the right. I realize that the
>>> problem is the extra DIV that I have surrounding my panels but I can't
>>> figure out how to keep that div and have things displaying normally at
>>> the same time. Have a look at my code below:
>>> <code>
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.1//EN"
>>> "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile11.dtd">
>>> <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
>>> <head><title>Send Message</title><meta name="viewport"
>>> content="width=320; initial-scale=1.0; maximum-scale=1.0; user-
>>> scalable=0;"/>
>>> <style type="text/css" media="screen">@import "/javascript/iui/
>>> iui.css";</style>
>>> <script type="application/x-javascript" src="/javascript/iui/iui.js"></
>>> script>
>>> <meta name="description" content="Tmoda helps you connect with the
>>> businesses and products in your community."/>
>>> </head><body> <div class="toolbar">
>>> <h1 id="pageTitle"></h1>
>>> <a id="backButton" class="button" href="#"></a>
>>> <a class="button" href="#searchForm">Search</a>
>>> </div>
>>> <div id="/167048/txtnow/" title="Send Message" class="page"
>>> selected="true
>>> <h2>Send Text Message</h2>
>>> <form method="post" action="/mail/167048/txtnow_s/"><fieldset>
>>> <div class="row"><label>Message:</label><input size="15"
>>> maxlength="155" format="text" value="" name="d"/></div>
>>>
>>> <div class="row"><label>Your 10 digit mobile number:</label> <input
>>> size="15" maxlength="10" style="-wap-input-format: "10N" "
>>> format="text" name="c_zip" value="1234564323"/></div>
>>> </fieldset>
>>> <input type="submit" accesskey="1" value="Send"/>
>>> </form></div>
>>> <form id="searchForm" class="dialog" action="/index/">
>>> <fieldset>
>>> <h1>New Search</h1>
>>> <a class="button leftButton" type="cancel">Cancel</a>
>>>
>>> <a class="button blueButton" type="submit">Search</a>
>>>
>>> <label>City:</label>
>>> <input id="artist" type="text" name="a"/>
>>> <label>Keywords:</label>
>>> <input type="text" name="b"/>
>>> <input type="hidden" name="c" value="Businesses"/>
>>> <input type="hidden" name="submit" value="s"/>
>>>
>>> </fieldset>
>>> </form> </body></html>
>>>
>>> </code>
>>>
>>> My css and js are pretty much stock 0.40 iUI.
>>>
>>> Thanks for any suggestions
>>> swj
>>>
>>> --
>>>
>>> You received this message because you are subscribed to the Google Groups
>>> "iPhoneWebDev" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected].
>>> For more options, visit this group at
>>> http://groups.google.com/group/iphonewebdev?hl=en.
>>>
>>>
>>
>>
>> Remi Grumeau
>> (+33) 663 687 206
>> http://www.remi-grumeau.com
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "iPhoneWebDev" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/iphonewebdev?hl=en.
>
>
Remi Grumeau
(+33) 663 687 206
http://www.remi-grumeau.com
smime.p7s
Description: S/MIME cryptographic signature
