Solved

Make a background image bigger than the browser window

Posted on 2014-03-19
1
431 Views
Last Modified: 2014-04-07
Hi,

I have a background image teh fills the entire browser window. I have set it to "cover" - so that it stretches to fill the window

I want to create a parrallax effect whereby it moves with mouse movement, So to do this i think i need to make the background image larger than the browser window, so that it has room to move left and right

How can i achieve this?
0
Comment
Question by:coolispaul
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 11

Accepted Solution

by:
Tej Pratap Shukla ~Dexter earned 500 total points
ID: 39939239
Hey coolispaul
You can achieve this by altering background image height and width , but overall the background image would look pixelarated .I have a solution that you could achieve somewhat "parallax" effect :
just modify the css by creating an id
#example{
  background-image:url(abcd.jpg);
      background-attachment:fixed;
background-size:cover;
}
you can call this id from body , eg : <body id="example">
Feel free to revert back for further query

Thanks
~Dex
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question