4

How do you set the background image to keep its position while the width of the...

 2 years ago
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.
neoserver,ios ssh client

How do you set the background image to keep its position while the width of the browser changes?

advertisements

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 go I set a background image to stretch in Internet Explorer 11? This is the CSS code that I am using (works in all other browsers except IE): body { background: url('/image.png') no-repeat center center fixed; background-repeat: no-repeat; backgr

How do you set the percentage in Google Visualization Chart API?

How do you set the vertical axis to display percent such as 25%, 50%, 75%, 100%? Thanks. chart.draw(data, {vAxis: {format:'#%'} } ); To get comma for thousands, use {format:'#,###%'}. See http://code.google.com/apis/chart/interactive/docs/gallery/lin

How do you set the jquery tabs to form a height of 100%?

how do you set the jquery tabs to form a 100% height? i also need to resize the iframe within it to expand to 100% height. thank you!To resize the UI Tabs (latest 1.7.2 version, at least), it worked with the following code: $ (document).ready (functi

How do you set the header to & ldquo; Accept & rdquo; application / json in dojo.store.JsonRest when putting or publishing?

How do you set the header "Accept" value to application/json in dojo.store.JsonRest when putting or posting? var dataStore = new dojo.store.JsonRest({ target : "/project-services/" }); dataStore.put({id: 10, field1: "Some Value&qu

When creating a maven module project, how do you set the language in scala?

I have intellij 11 ultimate. When creating a new maven module project, how do I set the project to use scala as the default language? Is there a way to run multiple versions of scala in intellij? (not at the same time, but for different projects).I t

When a d3.behavior.zoom event is programmatically triggered, how do you set the initial values ​​for translation and scale?

The squares in the example below are part of an SVG group that has an initial translate and scale set. Clicking on a square initiates a zoom transition. But the intial values set by the transition are different from my defaults, as made obvious by th

How do you set the default value of a drop-down list called via AJAX from another page?

For my code, my drop down lists are initiated on the original page, via <select name =country id=country onchange=showRecords(this.value,'country','province')>" This function is taking the value, equating it to country, then querying MySQL, and

In Access Continuous Form, how do you set the default to the previous entry?

In Access Continuous Form, how do I set the Default Value to be the previous entry? So if I have a field say "A", and I am entering a whole bunch of rows, in the first row, I enter "1", so for every next row that I enter, I want them t

In the x86 assembly, how do you set the Zero (ZF) flag without performing a comparison operation?

I have a short piece of (x86) assembly that I am trying to figure out what it does. ... 6: 81 ec 00 01 00 00 sub $0x100, %esp c: 31 c9 xor %ecx , %ecx e: 88 0c 0c mov %cl , (%esp, %ecx, 1) 11: fe c1 inc %cl 13: 75 f9 jne 0xe .... It looks like its lo

How do you use the browser to scroll to a fixed position?

How can I keep the browser from scrolling, or how can I make the browser continually scroll to a fixed posistion? I am working on a library for the Nintendo 3DS browser. I made the page fit perfectly within the browser, but the up arrow makes it scro

How do you set the position of the background image and the position of the gradient independently?

I have a big image that contains 4 little images. I want to set position for image only like 4px 4px to show first little image, but it is also used for the gradient background. How to set background image position and gradient position independently

How do I set a background image, using the & lt; Img & gt; Tag rather than CSS?

I have created 4 columns. Each column consisting of an image, where I want to place text over each image. To achieve this, I obviously need to set the image as a background. I am aware that this can be achieve through CSS (which is what I am currentl

How do I set a background image of the asp.net page?

I simply want to set an image as a background of asp.net page? I can display image in simple format on web page, but can't apply it as background.Use CSS. Add to the theme if you're using one, or a CSS file... body { background-image: url(images/imag

How do you set the background color for a height-adjustable page?

I have a web page that is minimum-height of 700px, but could be more. How do I use CSS to make sure that the body always has a background-color? body { min-height: 700px; background: red; } will not work since the body height will only fill in up to

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK