...

View Full Version : Background Tiling



andynov123
11-03-2010, 01:59 AM
Im trying to put a blackbar horizonatally on top for the design. But Im only seeing my image named blackbar.jpg once on the top right corner of screen.
here is my html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="Level1_Arial.css" rel="stylesheet" type="text/css" />
<link href="data.css" rel="stylesheet" type="text/css" />
</head>

<body>


</body>
</html>

Heres my css


body {background-image: url(blackbar.jpg); background-repeat: repeat-x;}


What am I doing wrong????????

DrDOS
11-03-2010, 02:17 AM
This is your third post on this problem. You don't really give enough information for us to help you solve it. We need at least to see all the .css code as well as the page, even better would be to have a link to your working page.

andynov123
11-03-2010, 04:44 AM
I want to set up a website so i can show you my problems but Im having problems finding free website hosting that lets me use my html and .css files.
Do you have any suggestions of a website that has free web hosting and html and css support??

teedoff
11-03-2010, 04:48 AM
Well by the very nature of being a hosting company, free or otherwise, if they didn't support html and css then they wouldnt be in business. Thats like saying are there any tv's in the market that supports digital signals.

There are free hosting companies out there, you just have to search for them. There have been several mention here at this forum, and I'm sure if you search here you will find them.

Chris Hick
11-03-2010, 05:09 AM
Could you just simply post your html file in one code box and then your two css files in another two code box? It would allow us to see what your problem is a little better. If you want to message me, I could take a look.

andynov123
11-03-2010, 05:36 AM
The files are attached. Just change index.txt to index.html

Major Payne
11-03-2010, 10:54 AM
I want to set up a website so i can show you my problems but Im having problems finding free website hosting that lets me use my html and .css files.
Do you have any suggestions of a website that has free web hosting and html and css support??

Free web site sources:

Budget Web Hosting List (2 pages): http://www.thefreecountry.com/webhosting/budget1.shtml
PHP, SMPT, Database (All Free): http://x10hosting.com/free-hosting-signup
http://www.piczo.com
http://sites.google.com
No Ads: http://www.weebly.com/features.html
http://www.angelfire.lycos.com/
http://WebStarts.com
http://freehostia.com/
http://bravenet.com/
http://www.sitesled.com/

www.oceanwalker.org
http://www.free-webhosts.com/
http://www.110mb.com/
http://50megs.com
http://www.sqweebs.com/
http://www.terapad.com/
http://www.freewebsitesdirect.com/
http://www.fortunecity.com/
http://www.draac.com/
http://free.prohosting.com


http://www.doteasy.com/
http://www.mister.net/
http://www.freeservers.com/
http://www.t35.com/
http://www.150m.com/
http://www.netfirms.com/
http://www.zoomshare.com/
http://www.wetpaint.com/
http://www.weebly.com/
http://www.freewebspace.com/


http://www.forumgogo.com/
http://www.freewebsites.com/
http://www.register.com/
http://webspawner.com/
http://dreamwater.com/
http://www.compfused.com/
http://batcave.net/
http://bappy.com/
http://atspace.com/
http://www.freedomain.co.nr/


http://www.blinkz.com/
http://www.yola.com/
http://personalweb.about.com/
http://www.xanga.com/

Some may no longer be free.

One of those should work just fine for you. As far as I know, ALL free hosting sites let you use your own HTML and CSS files. You just have to know how to use the tools they provide you as the do have File Uploaders for those who make their web pages locally.

Major Payne
11-03-2010, 10:59 AM
Have you tried?:



body {
background: #000 url(blackbar.jpg) repeat-x top left scroll;
}


Would be easier to just use a black color for your bar and save having browsers load an image.

andynov123
11-03-2010, 03:24 PM
The whole screen went black with your code, Major Payne

teedoff
11-03-2010, 03:53 PM
The reason its not repeating is because its not simply a black line. If you open the image you provided in windows image viewer, you will see that its a black line about 30 pixels in length, and then the line turns white and extends for a length. You need to create a new image using fireworks or photoshop. Usually something like this I will just create new file and then specifiy the canvas or background to be say 1 pixel wide x 10 pixels high, or however high you want it. then set background or canvas color to in this case black. Then save that to the root folder of your site. You may also consider moving the background image to its own div and not the body tag in case you want to later give your body another color.

Donkey
11-03-2010, 03:56 PM
You missed out the inverted commas.


body
{
background-image:url('blackbar.jpg');
background-repeat:repeat-x;
}

andynov123
11-03-2010, 04:22 PM
Now Donkeys code displays the image on the screen once. Theres no tiling. Its just the image. Isnt there html code I need to enter??????

teedoff
11-03-2010, 04:52 PM
Now Donkeys code displays the image on the screen once. Theres no tiling. Its just the image. Isnt there html code I need to enter??????

Did you read my post?...lol...the image you have is NOT just a black bar...it has a long part that is white. So yes it is repeating, but because its white, you dont see it.

teedoff
11-03-2010, 05:10 PM
here are your image and my image. I add a red background to your image so you could see the white section of your image extending out to the right. You can take my image and save it and if you need to modify the width and height, you can do so. Then the code you had will work.

Major Payne
11-03-2010, 09:02 PM
The whole screen went black with your code, Major PayneQuotes are not needed within the image URL, but the path to the image and the name MUST be correct. The screen went black because the background color was set to black, but that should be removed since you have not set a size for the body tag and it will set the whole page black. My oops.

Better if you set the blackbar this way:

CSS:


div#blackbar {
width: 90%;
height: YYpx
background: #000 url(blackbar.jpg) repeat-x top left scroll;
}


HTML after opening body tag:


<div id="blackbar"></div>

You could just leave out the image if it is to be just an all black color and use the background color of black instead. Or, set a fancy border style.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum