Solved

Fixed Backgroungs with no repeat

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Problem to be resolved in this article Currently, development of website and web application can be done without writing thousands of lines of programming code by hand. Description This can be done through by using a open source framework such …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn how to count occurrences of each item in an array.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

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

11 Experts available now in Live!

Get 1:1 Help Now