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