Html/css Help. Background Image Problem? |
||
Welcome to the Zymic webmaster forums. Our forums are here to provide people the free ability to discuss a range of websites related topics such as design, development coding and marketing.
In order to post you will need to register for a zymic account or if you already have one simply login by using the form on the left.
Zymic Webmaster Forums Web Design & Development General Web Design Discussion |
||
![]() |
Html/css Help. Background Image Problem? |
||
Jul 22 2012, 07:55 AM
Post
#1
|
|
|
Newbie ![]() Group: Members Posts: 2 Joined: 10-July 12 Member No.: 248,594 |
I have just started with css and my first project is being ruined. Help!
I wrote a small html page: <html> <head> <style type="text/css"> body { background-image:url("..\bk.jpg"); } </style> </head> <body> <p> text text text text text </p> </body> </html> [Do not worry about the path.] Such a simple code is not working. The problem is with the background image. It is not showing up. But it shows in IE9! No other browser shows it. I even can't write it in HTML because i need a repeat of the image. london airport transfers |
|
|
Jul 22 2012, 08:38 AM
Post
#2
|
|
|
Member ![]() ![]() Group: Members Posts: 32 Joined: 5-April 12 Member No.: 236,922 |
Hi
U can also just use a simple html tag <Body background=".../bg.png "> That would work niceley for you it also repeats thr back ground. Any other help just ask. |
|
|
Jul 22 2012, 02:54 PM
Post
#3
|
|
|
THE SILENT FORUM NINJA ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Administrators Posts: 3,758 Joined: 23-January 10 From: on your screen Member No.: 127,507 |
well remove ../ from it as well
|
|
|
Jul 23 2012, 08:53 PM
Post
#4
|
|
![]() Marvellous Ninja ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 570 Joined: 10-May 09 From: Wisconsin state, United States of America Member No.: 94,482 |
Hi alden1,
It is such a simple code: the background image path need(s) correction. Following through on the ssfdre38 mention provides the below corrected CSS [body background image call] code: CODE <html> <head> <style type="text/css"> body { background-image:url("bk.jpg"); } </style> </head> <body> <p> text text text text text </p> </body> </html> As AirOgames.zxq.net mentions, the In-Line HTML code could be as below: CODE <html> <head> </head> <body background="bk.jpg"> <p> text text text text text </p> </body> </html> Both of the above code corrections provide a page filled by "X" (horizontal) and "Y" (vertical) Repeats of the background image. Initially you had "background-image:url("..\bk.jpg");" wherein the " ..\ " (a possible leftover of the classic DOS filename call - which doesn't work in conventional HTML Source Code for call). For web page coding; the actuality of "ascending to the ROOT Folder" (navigating to a relational previous hierarchical folder within the web site structure) utilizes a " ../ ". As the "*.jpg background image" file is presumed not be be in another folder away from your simple code (web page), the use of the ascender is not warranted. Example: the HTML file was placed in an "images" folder (let's say) and the background image file was placed in the "ROOT" Folder (which has the "images" folder immediately within it) ... then the use of the "background-image:url("../bk.jpg");" (in corrected form) would be appropriate to get the "Root" Folder's background image file to display from the web page resident in the "images" folder. Hope this helps out a little more. |
|
|
![]() |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users) |
||
| 0 Members: | ||
Forum Jump |
||
| Lo-Fi Version | Time is now: 19th June 2013 - 05:48 AM |