There is one effect I once saw from a Flash application which I want to build using CSS - when user resizes the browser window beyond a minimum viewable area (say smaller than 500x800 px), replace the content with a message saying that the viewable screen size is too small
I tried the @media directive which is able to hide the original display content but I am not able to replace it with the message
@media screen and (max-width:900px), screen and (max-height:500px) {
.wrapper { display: none !important; }
.notice { display: block; visibility: visible; }
}
.notice {
display: none;
visibility: hidden;
}
Edit: Add HTML Code
<body>
<div class="wrapper">
<header class="header">My header</header>
<aside class="sidebar">Sidebar</aside>
<article class="content">
<h1>2 column, header and footer</h1>
<p>This example uses line-based positioning, to position the header
and footer, stretching them across the grid.</p>
</article>
<footer class="footer">My footer</footer>
</div>
<div class="notice">notice</div>
</body>
The above code in the CSS is able to hide the div wrapper when I resize the browser window beyond the given size but fail to show the notice div. When the screen size is of expected dimension, div notice should be hidden
I prefer not to consider any CSS framework at this point. Mainly because I am new to CSS and I also think that is an overkill
P.S. I can only use IE11 - don't ask me why
.noticehtml element nested inside.wrapper? Can you show whats the html structure of this two element ?