K
K
kirovFree2014-03-12 16:08:45
css
kirovFree, 2014-03-12 16:08:45

Chrome, media query, why doesn't the block fit into place?

Chrome 33.0.1750.146 Ubuntu 12.04 I decrease
the width of the browser media works, the block falls down as it should, but with the reverse resize - the block does not rise up to its original place.
Screenshots:
So before resize
db55f4ed832944149c751f96cea5b732.png
The media query
5d74f9d7041d4e7bbbe732ea80339153.png
resize worked back, and the block does not fall into place.
29a62c94eec64ed39bfbbc348fa75ead.pngCode:
(ASIDE - ill-fated block. #mainContent - block with text on the left)
Code according to the screenshots.
default

#mainContent{	
  display: inline-block;
  width: 40em;	
  margin: 0 0 0 15em;	
}
ASIDE {
  width: 35em;
  float: right;
  height: 23em;
  margin: 0 10em 0 0;	
}

media 640
#mainContent{
    margin: 0 auto;
    width: 41em;			
    display: block;		
  }
        ASIDE{
    width: 41em;	
    margin: 1em auto 0 auto;	
    float: none;		
    height: 10em;
  }

media 800
#mainContent{
    margin: 0 0 0 2em;
    max-width: 27em;
    display: inline-block;
  }
  
  ASIDE{
    width: 20em;
    margin: 0 1em 0 0;	
    float: right;
  }

In FireFox 27.0.1 and Opera 12.16 everything works as it should.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Ruslan Tovmasyan, 2014-03-12
@kirovFree

In version 33 of Google Chrome on GNU / Linux, there are problems with displaying some sites when resizing, apparently this is somehow related to your problem. At you I so understood Elementary OS.
Update: install Chromium now it's version 32 is stable. And it works as it should.

K
kirovFree, 2014-03-12
@kirovFree

Exactly the same behavior of another block is seen in the footer. The only similarity between these two blocks is float:right. In addition, if you move the block above #mainContent in the HTML tree, the block about which the question is, it behaves as intended, without this glitch.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question