D
D
dk-web2015-07-30 12:35:58
JavaScript
dk-web, 2015-07-30 12:35:58

Incorrect page loading. What is the problem? browser? or hands?

Here's what I encountered - when loading the page, the height of the content is incorrectly determined.
But this is only when fonts are connected ..
it doesn’t matter how - link, @ font .. @ import ...
Further - if you press f5 or reload the history repeats, if just through the address bar (or apply resize) - everything is ok.
Following the links - everything is also ok, but if you press f5 - everything breaks ... I
attach screenshots and fidd.
2454b1f1baef43eca3cbbb1008cc68a3.png- primary
45d1385591bb4383b116ca4178e2fada.png- result
1544e93f68754ea8b095e9f6e48b72f2.png- press enter in the address bar or resize
9e5706d928f2455587e9e9595ce236b0.png- result
I don’t even know where to dig ... Has anyone come across?
here is a fiddler project - but everything seems to be displayed correctly there.
jsfiddle.net/dkweb/n313exou/1
I work in Chrome (refresh and f5 don't work), Opera doesn't work either, but in Firefox it seems to be nothing...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
MhMadHamster, 2015-07-30
@dk-web

document.onreadystatechange = function() {
    if (document.readyState === 'complete') {
      $('div.sidebar').height($('div.content').height());
    }
  };

The problem was due to the fact that the resize occurred before the font was applied

S
Sergey Ivanov, 2015-07-30
@Writerim

Something tells me that you are not using float: left;

.sidebar {
  float: left;
}
.content {
  /* где float?? */
}

besides that, where is the clear:both float reset?
Take advantage of this and don't worry

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question