Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 15 of 15
  1. #1
    Regular Coder
    Join Date
    Oct 2010
    Posts
    269
    Thanks
    8
    Thanked 1 Time in 1 Post

    Background Tiling

    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????????

  • #2
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,915
    Thanks
    15
    Thanked 227 Times in 227 Posts
    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.

  • #3
    Regular Coder
    Join Date
    Oct 2010
    Posts
    269
    Thanks
    8
    Thanked 1 Time in 1 Post
    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??

  • #4
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,335
    Thanks
    5
    Thanked 363 Times in 360 Posts
    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.

  • #5
    Regular Coder
    Join Date
    Oct 2010
    Location
    Florence, MS
    Posts
    486
    Thanks
    10
    Thanked 33 Times in 32 Posts
    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.

  • #6
    Regular Coder
    Join Date
    Oct 2010
    Posts
    269
    Thanks
    8
    Thanked 1 Time in 1 Post
    The files are attached. Just change index.txt to index.html
    Attached Thumbnails Attached Thumbnails Background Tiling-blackbar.jpg  
    Attached Files Attached Files

  • #7
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    831
    Thanks
    10
    Thanked 79 Times in 77 Posts
    Quote Originally Posted by andynov123 View Post
    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.
    ☠ ☠RON☠ ☠

  • #8
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    831
    Thanks
    10
    Thanked 79 Times in 77 Posts
    Have you tried?:

    Code:
    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.
    ☠ ☠RON☠ ☠

  • #9
    Regular Coder
    Join Date
    Oct 2010
    Posts
    269
    Thanks
    8
    Thanked 1 Time in 1 Post
    The whole screen went black with your code, Major Payne

  • #10
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,335
    Thanks
    5
    Thanked 363 Times in 360 Posts
    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.

  • #11
    Regular Coder Donkey's Avatar
    Join Date
    Sep 2003
    Location
    Blackfield UK
    Posts
    312
    Thanks
    1
    Thanked 36 Times in 36 Posts
    You missed out the inverted commas.

    Code:
    body
    {
    background-image:url('blackbar.jpg');
    background-repeat:repeat-x;
    }
    " 90% of everything is crud" - Theodore Sturgeon
    Filthy Beast - a 60's Rock Band

  • #12
    Regular Coder
    Join Date
    Oct 2010
    Posts
    269
    Thanks
    8
    Thanked 1 Time in 1 Post
    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??????

  • #13
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,335
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Quote Originally Posted by andynov123 View Post
    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.
    Last edited by teedoff; 11-03-2010 at 04:01 PM.

  • #14
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,335
    Thanks
    5
    Thanked 363 Times in 360 Posts
    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.
    Attached Thumbnails Attached Thumbnails Background Tiling-myblackbar.jpg   Background Tiling-blackbar.jpg  
    Last edited by teedoff; 11-03-2010 at 04:19 PM.

  • #15
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    831
    Thanks
    10
    Thanked 79 Times in 77 Posts
    Quote Originally Posted by andynov123 View Post
    The whole screen went black with your code, Major Payne
    Quotes 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:

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

    Code:
    <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.
    Last edited by Major Payne; 11-03-2010 at 08:08 PM.
    ☠ ☠RON☠ ☠


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •