How do you set the background image to keep its position while the width of the...
source link: https://www.codesd.com/item/how-do-you-set-the-background-image-to-keep-its-position-while-the-width-of-the-browser-changes.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
How do you set the background image to keep its position while the width of the browser changes?
I am wondering how I could set the background image to keep its position on this site: http://www.jylkkari.fi/wordpress/
When you drag the browser under 960 px wide, the background of sidebar starts to move towards center.
I found out this Javascript which could solve this problem.
I am still searching if there is a easy way in CSS to keep the image centered while browser width is more than 960 px and on fixed while it is under this size?
.......................... Define your body
min-width:980px;
body{
min-width:980px;
}
--------------for ie
used to ie condition css as like this
<!--[if lt IE 8]>
<link rel="stylesheet" type="text/css" href="ie8-and-down.css" />
<![endif]-->
create a css file
body{width:980px;}
more info about ie css click here
Related Articles
CSS - How do I set a background image to stretch you in IE11
How do you set the percentage in Google Visualization Chart API?
How do you set the jquery tabs to form a height of 100%?
How do you set the header to & ldquo; Accept & rdquo; application / json in dojo.store.JsonRest when putting or publishing?
When creating a maven module project, how do you set the language in scala?
When a d3.behavior.zoom event is programmatically triggered, how do you set the initial values for translation and scale?
How do you set the default value of a drop-down list called via AJAX from another page?
In Access Continuous Form, how do you set the default to the previous entry?
In the x86 assembly, how do you set the Zero (ZF) flag without performing a comparison operation?
How do you use the browser to scroll to a fixed position?
How do you set the position of the background image and the position of the gradient independently?
How do I set a background image, using the & lt; Img & gt; Tag rather than CSS?
How do I set a background image of the asp.net page?
How do you set the background color for a height-adjustable page?
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK