472,981 Members | 1,113 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,981 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 16079
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?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.