473,396 Members | 1,599 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Non-tiled background images

Hey all,

I have found two seperate HTML codes which claim to stop background
images from being tiled. Neither of them seem to be working. I'm
writing my codes in Textpad, and use Internet Explorer 6 for my
browser.

Below you will find the two codes I've found. Can anyone tell me why
the hell they're not working?! This is driving me insane... moreso!!!!

<style>
<!--
BODY
{background-image: URL( your-image.gif);
background-repeat: no-repeat;
background-position: center;
background-align: middle;
}
-->
</style>
</HEAD>

I was instructed to place the following code into a style sheet

body { color: black; background: white url(foo.gif) no-repeat }

I would also quickly like to reiterate the fact that I'm so new to
this whole HTML world that newbie doesn't even come close to
describing me. And you can call me stupid on the condition you proved
me with an answer that fixes my problem!!! :-)

Thanks,
~L.
Jul 20 '05 #1
2 16105
lo*****@ozconnect.net.au wrote:
I have found two seperate HTML codes which claim to stop background
images from being tiled.
That would be presentation, and therefore CSS' job, not HTML's. Followups
to comp.infosystems.www.authoring.stylesheets set.

Neither of them seem to be working. I'm writing my codes in Textpad, and
use Internet Explorer 6 for my browser.
Internet Explorer has many deficiencies, although as far as I know it
doesn't have any trouble with this part of CSS. It's usually easier to
have a high-quality browser such as Mozilla handy for your initial
development, and then place a few workarounds in your code to help the aged
Internet Explorer out a little.

Below you will find the two codes I've found. Can anyone tell me why
the hell they're not working?! This is driving me insane... moreso!!!!

<style>
You have invalid HTML. Before asking for help, please check your code for
errors. You can use the publically available free services provided by the
W3C for this:

<URL:http://validator.w3.org/>
<URL:http://jigsaw.w3.org/css-validator/>

<!--
BODY
{background-image: URL( your-image.gif);
background-repeat: no-repeat;
background-position: center;
background-align: middle;
}
-->
</style>
</HEAD>
That looks decent enough to me.

I was instructed to place the following code into a style sheet

body { color: black; background: white url(foo.gif) no-repeat }
That would also do the trick.

I would also quickly like to reiterate the fact that I'm so new to
this whole HTML world that newbie doesn't even come close to
describing me. And you can call me stupid on the condition you proved
me with an answer that fixes my problem!!! :-)


Being new to something doesn't mean you are stupid. There doesn't seem to
be anything majorly wrong with the code you posted. There may be something
else that is interfering, but as you haven't provided a URL to a testcase,
nobody is in any position to give further help. Whack a document up on the
web somewhere and post the URL.

Also, I think it's worth mentioning that I've seen the result of the
attitude of copying code without understanding how it works - you end up
knowing a few tricks here and there, and completely unable to help yourself
when something goes wrong or you need to do something new. I'd recommend
sitting down and reading a good HTML and CSS tutorial, and skimming through
the relevant specifications:

<URL:http://www.w3.org/TR/html401/>
<URL:http://www.w3.org/TR/REC-CSS2/>
--
Jim Dabell

Jul 20 '05 #2
lo*****@ozconnect.net.au wrote in message news:<u9********************************@4ax.com>. ..
Hey all,

I have found two seperate HTML codes which claim to stop background
images from being tiled. Neither of them seem to be working. I'm
writing my codes in Textpad, and use Internet Explorer 6 for my
browser.

Below you will find the two codes I've found. Can anyone tell me why
the hell they're not working?! This is driving me insane... moreso!!!!

<style>
<!--
BODY
{background-image: URL( your-image.gif);
background-repeat: no-repeat;
background-position: center;
background-align: middle;
}
-->
</style>
</HEAD>

I was instructed to place the following code into a style sheet

body { color: black; background: white url(foo.gif) no-repeat }

I would also quickly like to reiterate the fact that I'm so new to
this whole HTML world that newbie doesn't even come close to
describing me. And you can call me stupid on the condition you proved
me with an answer that fixes my problem!!! :-)

Thanks,
~L.

Can you define 'not working'. Is the image tiling regardless, or is it
just not appearing? From the code fragment you've given it might be
that you don't have the full path to the image, so the browser isn't
finding the image to render it.

Alternatively try this version:

BODY { background-position: center middle; background-image:
url(images/background.jpg); background-repeat: no-repeat }

peter stokes
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: klaus triendl | last post by:
hi, recently i discovered a memory leak in our code; after some investigation i could reduce it to the following problem: return objects of functions are handled as temporary objects, hence...
3
by: Mario | last post by:
Hello, I couldn't find a solution to the following problem (tried google and dejanews), maybe I'm using the wrong keywords? Is there a way to open a file (a linux fifo pipe actually) in...
25
by: Yves Glodt | last post by:
Hello, if I do this: for row in sqlsth: ________pkcolumns.append(row.strip()) ________etc without a prior:
32
by: Adrian Herscu | last post by:
Hi all, In which circumstances it is appropriate to declare methods as non-virtual? Thanx, Adrian.
8
by: Bern McCarty | last post by:
Is it at all possible to leverage mixed-mode assemblies from AppDomains other than the default AppDomain? Is there any means at all of doing this? Mixed-mode is incredibly convenient, but if I...
14
by: Patrick Kowalzick | last post by:
Dear all, I have an existing piece of code with a struct with some PODs. struct A { int x; int y; };
11
by: ypjofficial | last post by:
Hello All, So far I have been reading that in case of a polymorphic class ( having at least one virtual function in it), the virtual function call get resolved at run time and during that the...
2
by: Ian825 | last post by:
I need help writing a function for a program that is based upon the various operations of a matrix and I keep getting a "non-aggregate type" error. My guess is that I need to dereference my...
399
by: =?UTF-8?B?Ik1hcnRpbiB2LiBMw7Z3aXMi?= | last post by:
PEP 1 specifies that PEP authors need to collect feedback from the community. As the author of PEP 3131, I'd like to encourage comments to the PEP included below, either here (comp.lang.python), or...
12
by: puzzlecracker | last post by:
is it even possible or/and there is a better alternative to accept input in a nonblocking manner?
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.