Solved

Image stay at the same place

Posted on 2014-01-13
9
180 Views
Last Modified: 2014-01-14
How the background image stay at the same place when user scroll the page up and down and also move it halfway down the page and tiling it horizontally by using css?

Thanks

<html>
<head>
<ttle></title>
<style type = "text/css">
body
{
background-image:url('MyPicture.png');
background-repeat:no-repeat;
} 
</style>
</head>
<body>
</body>
</html>

Open in new window

0
Comment
Question by:mustish1
  • 4
  • 3
9 Comments
 
LVL 51

Expert Comment

by:Julian Hansen
ID: 39776292
Have you tried this
<html>
<head>
<ttle></title>
<style type = "text/css">
body
{
background-image:url('MyPicture.png');
background-position:center;
background-repeat:repeat-x;
background-attachment:fixed;

} 
</style>
</head>
<body>
</body>
</html>
                                  

Open in new window

0
 

Author Comment

by:mustish1
ID: 39776297
its showing a bunch of images. Is there any way it shows only one

Thanks
0
 
LVL 51

Expert Comment

by:Julian Hansen
ID: 39776330
Change

background-repeat:repeat-x;

To

background-repeat:none;
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:mustish1
ID: 39778142
The code fill it up the whole page with the image.

<html>
<head>
<ttle></title>
<style type = "text/css">
body
{
background-image:url('mypic.png');
background-position:center;
background-repeat:none; 
background-attachment:fixed;

} 
</style>
</head>
<body>
</body>
</html>

Open in new window

0
 
LVL 51

Accepted Solution

by:
Julian Hansen earned 500 total points
ID: 39778506
Apologies - should be no-repeat not none.
Try this
<html>
<head>
<ttle></title>
<style type = "text/css">
body
{
background-image:url('mypic.png');
background-position:center;
background-repeat:no-repeat; 
background-attachment:fixed;

} 
</style>
</head>
<body>
</body>
</html>

Open in new window

0
 

Author Closing Comment

by:mustish1
ID: 39778542
Thanks
0
 
LVL 51

Expert Comment

by:Julian Hansen
ID: 39778604
You are welcome - thanks for the points.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
It's sometimes a bit tricky to use date functions in Oracle BPEL. I'll explain quickly how you can add N days to the current date. In a BPEL process this can be useful, and you can adapt it to fit your needs. First of all, let's see how to add 1 …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now