?
Solved

backgrounds

Posted on 2002-03-27
5
Medium Priority
?
265 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 200 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
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 viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

752 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