I'm testing a simple HTML page.
<body onload="startApp()"> <header id="menu"> <a href="#" id="linkHome">Home</a> <a href="#" id="linkLogin">Login</a> <a href="#" id="linkLogout">Logout</a> <span id="loggedInUser"></span> </header> <section id="loadingBox">Loading ...</section> <section id="infoBox">Info</section> <section id="errorBox">Error</section> <main> <section id="viewHome"> <h1>Welcome</h1> Welcome to eShop. </section>
The "loadingBox" sections, etc., pop-up error messages, etc. The problem is that when a similar section appears with jQuery, the main "main" goes down and when the message disappears, the main section rises. How to make a static indent from HEADER?
It's not entirely clear what exactly you want to see as a result, but ...
Alternatively, you can create a wrapper container in which messages will be displayed (some kind of messages-wrapper), but there will be problems if there are several messages and the sum of their heights exceeds the allocated space. In this case, applying the css min-height property to a wrapper with a value equal to the expected height of the allocated space will help:
min-height: 100px
Source: https://ru.stackoverflow.com/questions/598767/More articles:Parse List What should be added to count the number of seats sold?How to specify relative path from jarGSM packet interceptionHow to add data-attr (data-type) symfony form specifically in optionFancybox does not work on some pages of the site (Bitrix) [closed]How to set an array from -100 to 100? numbers should go in order, without randomHow to make an inverted parallelogram with CSS?Reordering columns [bootstrap]Remove duplicates by two fieldsAll Articles