Html Moving When Resizing Browser
Solution 1:
yes this would happen because your css is good for default browser view only but when u resize it will not be good.u cn either search google for "script for auto detection of UA".then u have to make different-2 css for different screen sizes.
Solution 2:
You have a design that is 1360 px wide and several of your images are 1360 px wide, or combinations of them are 1360 px wide this is OK if your target audience can support that but generally there are going to be some users for which this is going to be too wide.
You use float left for all your images and combinations of images. Typically when they are combined on a line some are going to start to drop onto the next line when your display width get below the total combined width that they would take up.
I've stripped out all your script and replaced the images with a solid background colour because I don't have any of your images.
But this works and does not move about and should give you a place to start from, for putting back your elements.
<body>
<div class="images">
<div class="row row1 full">
<div id="home1"></div>
</div>
<div class="row narrow-strip">
<div id="home2"></div>
<div id="home3"></div>
<div id="home4"></div>
</div>
<div class="row row3 full">
<div id="home5"></div>
</div>
<div class="row narrow-strip">
<div id="home6"></div>
<div id="home7"></div>
<div id="home8"></div>
</div>
<div class="row row5 full">
<div id="home9"></div>
</div>
<div class="row narrow-strip">
<div id="home10"></div>
<div id="home11"></div>
<div id="home12"></div>
</div>
<div class="row row7 full">
<div id="home13"></div>
</div>
</div>
</body>
and then you can clean out a lot of repetition from your CSS like this:
.images {
margin: auto auto;
width: 1360;
}
.images div {
padding:0;
margin:0;
}
.images .row {
width:1360px;
}
.images .row div {
float:left;
display:inline-block;
height:100%;
}
.images .row.full div {
width:100%;
}
.images .row.narrow-strip {
height:63px;
}
.images .row1 {
height:420px;
}
.images .row3 {
height:492px;
}
.images .row5 {
height:1549px;
}
.images .row7 {
height:128px;
}
#home1 {
background-color:#EEE;
height: 420px;
}
#home2 {
background-color:#DDD;
width: 548px;
}
#home3 {
background-color:#CCC;
width: 262px;
}
#home4 {
background-color:#BBB;
width: 550px;
}
#home5 {
background-color:#AAA;
height: 492px;
}
#home6 {
background-color:#999;
width:560px;
}
#home7 {
background-color:#888;
width:202px;
}
#home8 {
background-color:#777;
width:598px;
}
#home9 {
background-color:#666;
height: 1549px;
}
#home10 {
background-color:#777;
width:860px;
}
#home11 {
background-color:#444;
width:262px;
}
#home12 {
background-color:#333;
width:238px;
}
#home13 {
background-color:#222;
height: 128px;
}
Post a Comment for "Html Moving When Resizing Browser"