• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

CSS height and width getting set to 0 px

 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working on a hybrid mobile-app and one of the screens is having an issue where the height and width of a div element is being set to 0px causing the screen to not display as required.

Below is how the screen is expected to look like:



The issue is with the grid like div element in the middle. When this screen is displayed above as required, the height and width of this div is set to 500px and 358px respectively.



However, the issue is that when this screen loads for the first time, the screen is displayed as below:


As can be seen, the grid in the middle is not displayed.

The content-section div has width and height set to 0 pixels.



However if we select a different order (using the dropdown on the top), the screen is reloaded and displayed correctly as required (with height and width set to appropriate pixel values).

Now I am not looking for the exact answer to this issue (if somebody can give this, nothing like it) but I am trying to understand if you faced this issue, what would be the next step to follow. How can we identify the root cause behind the height and width getting set to 0 px the first time the screen is
 
Marshal
Posts: 27589
88
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That wouldn't be my question. My question would be "Why aren't the height and width values being set to the numbers I wanted them to be set to?"
 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:That wouldn't be my question. My question would be "Why aren't the height and width values being set to the numbers I wanted them to be set to?"


This is a difficult question to answer since you're providing a limited amount of your coding, provide more information so that people can understand how you're trying to build your app and how you can fix the problem.
 
Every plan is a little cooler if you have a blimp. And a tiny ad.
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic