|
|
|
|
![]() ![]() |
Feb 19 2007, 04:16 PM
Post
#1
|
|
|
Member [Level 2] ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 87 Joined: 5-February 07 Member No.: 38,338 |
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://img.photobucket.com/albums/v614/Dj1.../background.jpg and this is what it looks like when i put it into HTML http://img.photobucket.com/albums/v614/Dj169211/Damn.jpg i dont want it tiled like that so is there any way that i can change that? any ideas? :| Thanks in advance |
|
|
|
Feb 19 2007, 05:47 PM
Post
#2
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 413 Joined: 4-October 06 From: Psychedelic Realms Member No.: 31,079 |
Well this is not using your image, but achieving similar thing with simple use of CSS like this
HTML <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 CODE body {
background: url(yourimage.jpg) no-repeat; } This post has been edited by matak: Feb 19 2007, 05:52 PM |
|
|
|
Feb 19 2007, 05:51 PM
Post
#3
|
|
|
Trap Grand Marshal Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 1,314 Joined: 11-January 06 From: Chennai, India Member No.: 16,932 |
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> CODE <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 This post has been edited by delivi: Feb 19 2007, 05:54 PM |
|
|
|
Feb 19 2007, 07:34 PM
Post
#4
|
|
|
Member [Level 2] ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 87 Joined: 5-February 07 Member No.: 38,338 |
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... CODE <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. |
|
|
|
Feb 20 2007, 12:12 AM
Post
#5
|
|
|
Premium Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 165 Joined: 12-September 05 Member No.: 11,777 |
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. the marked red should be CODE body { background-image:url("http://img.photobucket.com/albums/v614/Dj169211/background.jpg"); background-repeat: no-repeat}
|
|
|
|
Feb 20 2007, 07:23 PM
Post
#6
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 4,081 Joined: 24-July 05 From: Linix, DOS and Windows…the good, the bad and the ugly Member No.: 9,787 ![]() |
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://codingforums.com/showthread.php?t=107915 |
|
|
|
Apr 16 2007, 01:04 AM
Post
#7
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 786 Joined: 13-April 07 From: mreža Member No.: 41,558 |
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.
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 12th October 2008 - 04:17 PM |