Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Highlighted
New Contributor
Posts: 4
Registered: ‎02-02-2013
My Device: Bold

HTML5 with position fixed in simulator

Hi there,

 

I have a strange result when testing a web application with the BlackBerry simulator.

 

Every HTML element with position is not visible on the screen anymore when viewing the website.

 

Even jQuery Mobile examples do not work. (http://jquerymobile.com/demos/1.2.0/docs/toolbars/bars-fixed.html)

 

Is this a known problem? Or do I miss anything?

 

I'm using:

- BlackBerry Simulator_7.0.0.384_9900

- BlackBerry Simulator_7.1.0.355_9930

 

Thanks and regards,

 

Jakob

Contributor
Posts: 58
Registered: ‎02-04-2013
My Device: Torch
My Carrier: Airtel

Re: HTML5 with position fixed in simulator

Can you just post your exact code to review it once..
It might be just the problem of some configuration.

New Contributor
Posts: 4
Registered: ‎02-02-2013
My Device: Bold

Re: HTML5 with position fixed in simulator

That's the problem, it seems that every way to have a fixed element does not work. The following is an example:

 

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
        <title>FixedDiv</title>
        
        <style type="text/css">
            #fixedDiv {
                position: fixed;
                top: 0px;
            }
        </style>
    </head>
    <body>
        <div id="fixedDiv">This should stay fixed. </div>
        <div>Line 1</div>
        <div>Line 2</div>
        <div>Line 3</div>
        <div>Line 4</div>
        <div>Line 5</div>
        <div>Line 6</div>
        <div>Line 7</div>
        <div>Line 8</div>
        <div>Line 9</div>
        <div>Line 10</div>
        <div>Line 11</div>
        <div>Line 12</div>
        <div>Line 13</div>
        <div>Line 14</div>
        <div>Line 15</div>
        <div>Line 16</div>
        <div>Line 17</div>
        <div>Line 18</div>
        <div>Line 19</div>
        <div>Line 20</div>
        <div>Line 21</div>
        <div>Line 22</div>
        <div>Line 23</div>
        <div>Line 24</div>
        <div>Line 25</div>
        <div>Line 26</div>
        <div>Line 27</div>
        <div>Line 28</div>
        <div>Line 29</div>
        <div>Line 30</div>
        <div>Line 31</div>
        <div>Line 32</div>
        <div>Line 33</div>
        <div>Line 34</div>
        <div>Line 35</div>
        <div>Line 36</div>
        <div>Line 37</div>
        <div>Line 38</div>
        <div>Line 39</div>
        <div>Line 40</div>
        <div>Line 41</div>
        <div>Line 42</div>
        <div>Line 43</div>
        <div>Line 44</div>
        <div>Line 45</div>
        <div>Line 46</div>
        <div>Line 47</div>
        <div>Line 48</div>
        <div>Line 49</div>
    </body>
</html>

Contributor
Posts: 58
Registered: ‎02-04-2013
My Device: Torch
My Carrier: Airtel

Re: HTML5 with position fixed in simulator

Its better to use
position:relative
Because otherwise the output will get messed up

New Contributor
Posts: 4
Registered: ‎02-02-2013
My Device: Bold

Re: HTML5 with position fixed in simulator

I can't achieve the same result with position:relative.

 

Is the example working for you?

Contributor
Posts: 58
Registered: ‎02-04-2013
My Device: Torch
My Carrier: Airtel

Re: HTML5 with position fixed in simulator

Yeah It is working for me

New Contributor
Posts: 4
Registered: ‎02-02-2013
My Device: Bold

Re: HTML5 with position fixed in simulator

In the Simulator or a device?