?
Solved

Fixed Backgroungs with no repeat

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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
Strategic internal linking is often considered an SEO power technique, especially for content marketing. Do you need to hire an SEO agency to optimize you internal linking? No, this article will help you understand the basics of internal linking and…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses
Course of the Month16 days, 11 hours left to enroll

862 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