Solved

Fixed Backgroungs with no repeat

Posted on 2000-02-14
2
208 Views
Last Modified: 2013-12-25
I have this bit of code that stops a background form repeating and aslo makes it fixed. Thing is that it was working and now for some reason its not.

It image is still scrolling .

This is the bit of code:-
<P
STYLE="background-repeat: no-repeat; background-image: url(background.jpg);background-attachment: fixed; )">

Is there another way or do you know why this is not working?
0
Comment
Question by:ggets
2 Comments
 
LVL 1

Expert Comment

by:Astronus
ID: 2521658
try this
<body BACKGROUND="background.jpg" BGPROPERTIES=FIXED>

if you want no repeat u can make no repeat background, the only is make a big image that fit large size resolution with white or whatever u think is the best
0
 

Accepted Solution

by:
jervis earned 100 total points
ID: 2522869
Actually you either have to use the <body bgproperties=fixed>, but this does only work with Microsoft Internet Explorer.

A different approach are Cascading Stylesheets (CSS), but your snippet is faulty. Try this:

<head>
  <title>Your title</head>
  <style type="text/css"><!--
    body {
      background : url("/img/background.jpg") no-repeat fixed;
    }
  --></style>
</head>

<body background="/img/background.jpg ...>

Instead of no-repeat you can use repeat-x, repeat-y or repeat. Instead of fixed you can use scroll. Netscape does not support the fixed attribute, maybe the next version will support CSS Level 1 a little better.

The CSS is the shorthand notation for background. The long would be:

background-image: url("/img/background.jpg");
background-repeat: no-repeat;
background-attachment: fixed;
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Read about why website design really matters in today's demanding market.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

772 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