• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

CSS height and width getting set to 0 px

 
Ranch Hand
Posts: 160
  • 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: 28263
95
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic