Solved

backgrounds

Posted on 2002-03-27
5
263 Views
Last Modified: 2010-04-09
hi, im making a website and i want to have a background picture on a page but i dont want it repeated throughout the whole page, how do i do this? :)
0
Comment
Question by:wolfdood
[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
  • 3
  • 2
5 Comments
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 50 total points
ID: 6899996
This is an IE (and Netscape 6) only method of having a "no-tile" background.
Because it uses no-repeat image won't scroll with the page.
Just like the effect of BGPROPERTIES="fixed"

<HTML>
<HEAD>
   <TITLE> Fixed background using styles <TITLE>
<STYLE TYPE="text/css">
   BODY { background-repeat:no-repeat;background-attachment:fixed;
          background-position:left top;background-image:url(blah.jpg) }
</STYLE>
</HEAD>
<BODY>
etc...

The background-position can left/center/right for x axis and
top/center/bottom for the y axis.  With IE5.5 you can use a numeric value to
specify the x/y co-ordinates in pixels      

=====================================================      

cross-browser ???

<HTML>
<HEAD>
<STYLE TYPE="text/css">
   #bgID { position:absolute;top:xxx;left:yyy;z-index:1 }
</STYLE>
</HEAD>
<BODY>
   <!-- page stuff -->

   <DIV ID="bgID">
      <IMG SRC="blah.jpg">
   </DIV>
</BODY>  
</HTML>

The z-index value can be a problem.  Netscape does not accept a
negative value so other elements must be 2 or higher.

Cd&
0
 

Author Comment

by:wolfdood
ID: 6900022
i tried the first way of doing it but i cant get my background to show. the pic im using for the background is in the same folder for the wedsite and is called background.png     do i need to specify its full path? thanx.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6900060
I did't think you deeded full path, but you can try it.  Also do not put quotes around it, and make sure of the spelling some hosting services are case sensitive.

Cd&
0
 

Author Comment

by:wolfdood
ID: 6900083
ta very much!!! :)
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6900111
Glad I could help.  Thanks for the A. :^)

Cd&
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CSS Scroll Center with Static Side. Like EE does. 2 46
Table header must be on top 2 57
asp.net, radiobuttonlist, c# 3 69
Div not showing up 6 32
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

732 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