• 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

Div elements not lining up. JSP

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I am a server side developer trying my hand at some front end code.
I have this site that displays results in a table format using divs. My problem is that when I do a search sometimes the div elements are all screwed up but if I do a refresh they are fine. If the site is under load the screen also loads with some div elements not lined up or displaying on the next row, but again a refresh corrects the problem.
It is as if the screen paints before the style sheet has finished loading.
When I run locally on the same version as the hosted tomcat it works fine.

Any suggestions will be welcome.

If you want to see the error in action you can do a search on http:/www.whatjar.co.uk


Thanks in advance..
Shawn
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Strange it only seems to happen around entries such as ???search.results.jar.header??? which look to me like property value lookup failures from <fmt:message>.

Can't think of why that would trigger such difficulties (unless the entries are too long for alloted sapce and so you're getting unwanted cascading), but I;d fix the lookup failures befre proceeding to try and fix the layout problems.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you run it through a validator to see if there is bad markup?

http://validator.w3.org/

Eric
 
Shawn Vader
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the advice, not sure why there were property lookup failures but that would cause the div to be out of line.
I think running it through a html validator is a good first step.


Thanks
Shawn
 
Shawn Vader
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To update those that are interested. I have managed to resolve the problem of the div elements lining up sometimes and not others and especially in Firefox when the webserver is under load.
I took the advice or validating the html which I would recommend to anyone learning html as it gives you a clear indication of what is wrong and why.
The second thing I did was donwload the firefox developers tool bar which is amazing, it allows you to see all you div elements and the order in which they load. Form this I found out that I had a div in the wrong place and after that the site is fine...

Adios
Signing off for Easter..
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe that this is the extension Shawn was referencing.
 
Shawn Vader
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When Bear checked my site my i18n properties were not resolving for his us locale. I am using spring mvc and was using the ResourceBundleMessageSource to load the locale properties but have changed it to use the ReloadableResourceBundleMessageSource.

Since I have to reboot this windows box to change the locale I would appreciate if anyone who has a locale other than gb can just see if the properties are loading for them.
the site is http://www.whatjar.co.uk if the title is not ???title then it has worked...

I need to find a way to unit test it

Thanks
Shawn
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic