?
Solved

Fixed Backgroungs with no repeat

Posted on 2000-02-14
2
Medium Priority
?
233 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
[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
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 200 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

More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

Question has a verified solution.

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

An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

777 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