Jump to content
xisto Community
Sign in to follow this  
~Dave

Help With Background Image please? :)

Recommended Posts

Ok heres the scoop, i got a background that i made in paint for my website its just like 3 lines for the nav bar, banner and other things ect. ect. now when i hosted it on a site and put in the <img src= code with the URL of that picture it shows up and everything but its tiled and shows 4 of them...

This is what it looks like in paint
http://forums.xisto.com/no_longer_exists/404.png
and this is what it looks like when i put it into HTML
http://forums.xisto.com/no_longer_exists/404.png

i dont want it tiled like that so is there any way that i can change that?

any ideas? :| Thanks in advance :P

Share this post


Link to post
Share on other sites

Well this is not using your image, but achieving similar thing with simple use of CSS like this

<style>
div {
background: #000000;
color: #FFFFFF;
border-left: 4px solid blue;
border-bottom: 4px solid blue;
width: 600px;
height: 120px;
}
</style>
<div>
Your div
</div>



You can see result here

EDIT:
Oh and you problem is in that you have to set background to no-repeat with CSS like this

body {background: url(yourimage.jpg) no-repeat;}

Edited by matak (see edit history)

Share this post


Link to post
Share on other sites

if you want a background for your page, you should'nt use <IMG> tag, use the following css code

include the code in between the <HEAD> </HEAD>

<style type="text/css">body { background-image:url("URL_OF_IMAGE"); background: no-repeat;}</style>

replace URL_OF_IMAGE with the image url that you want to be your background
Edited by delivi (see edit history)

Share this post


Link to post
Share on other sites

ok, i tried both and all i got was a blank page. What am i doing wrong? i name the file Index.html

here is what it is so far...


<html><title>*my title*</title><body><style type="text/css">body { background-image:url("http://img.photobucket.com/albums/v614/Dj169211/background.jpg"); background: no-repeat;}</style></html></body>


i know that is not a full html text file but i'm just testing the back ground img.

Notice from truefusion:
Place all code into the CODE bbcode.

Share this post


Link to post
Share on other sites

ok, i tried both and all i got was a blank page. What am i doing wrong? i name the file Index.html

 

here is what it is so far...

<html>

<title>

*my title*

</title>

<body>

<style type="text/css">

body { background-image:url("http://forums.xisto.com/no_longer_exists/404.png;); background: no-repeat;}</style>

</html>

</body>

i know that is not a full html text file but i'm just testing the back ground img.


the marked red should be

 

body { background-image:url("http://img.photobucket.com/albums/v614/Dj169211/background.jpg"); background-repeat: no-repeat}

Share this post


Link to post
Share on other sites

A similar question at another Forum I attend to has a thread about this and one recommendation is to use 4 div's, which makes sense and would probably be easier. CSS only with borders.
Have look here: http://www.codingforums.com/html-and-css/107915-intersection-lines-text.html

Share this post


Link to post
Share on other sites

You probably have problem with the size of your image as it is too small to fit as background it just tiles up. That's why you gt such effect maybe using table and cells would be better you can make it look just like your image.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.