Dr.Kameleon
Dr.Kameleon

Reputation: 22810

jQueryMobile-enabled site within a DIV

OK, here's what I'm trying to achieve :

Notes :

Any ideas?


UPDATE : Here's the jsfiddle : http://jsfiddle.net/X5xys/


And the code...

HTML :

<div id="preview"> 
    <div id="iframe">
        <div data-role="page">
            <div data-role="header">
                <h1>Header</h1>
            </div>
            <div data-role="content">
                <a data-role="button" id="mybutt" href="#">
                    Click me
                </a>
                <a data-role="button" id="mybutt" href="#">
                    Click me
                </a>
                <a data-role="button" id="mybutt" href="#">
                    Click me
                </a>
                <a data-role="button" id="mybutt" href="#">
                    Click me
                </a>
                <a data-role="button" id="mybutt" href="#">
                    Click me
                </a>
                <a data-role="button" id="mybutt" href="#">
                    Click me
                </a>
            </div>
        </div>          
    </div>
</div>

CSS :

        #preview {
            margin:50px auto;
            background-size: 376px 678px;
            width: 376px; max-width: 376px;
            height: 678px; max-height: 678px;
            text-align: center;
        }

        #preview #iframe {
            margin:92px auto;
            border:1px solid black;
            width:320px; max-width: 320px;
            height:480px; max-height: 480px;

        }

Upvotes: 0

Views: 306

Answers (1)

Kawinesh S K
Kawinesh S K

Reputation: 3220

add a Id="page" for you data-role="page" and give the following css

#page{
    position:relative;
}

Demo

Upvotes: 2

Related Questions