Solved

Fixed Backgroungs with no repeat

Posted on 2000-02-14
2
212 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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Wrapper for APPs 9 85
Need help deploying my first MVC.Net app with a SQL Server backend 3 25
How to make a good PHP + MySQL + JS pagination system? 3 34
Designing forms 3 19
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
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?
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

828 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