Welcome Guest ( Log In | Click here to Register a free account now! )
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.![]() ![]() |
Dec 28 2007, 09:33 AM
Post
#1
|
|
|
Member ![]() ![]() Group: Members Posts: 66 Joined: 13-October 07 From: nigeria Member No.: 162,754 |
i have encountered a problem though, i tried using a jpg file as my backgroung image but it wouldnt load. is it that jpg is too heavy? or its impossible to use it for such?! did i miss my footing in following the right steps? i suppose i have done evrything right. isn't: creating a main folder, creatin a sub folder in the main folder(image folder-stored mine as king),using a html editor-notepad, and saving in .html. my bit is; <img src="images/king/sammy.JPG" border="2" height="1000" width="600"alt="this is my graduation picture". thank you plenty in advance. -------------------- Lost! i havent seen season three. link? link? linK? vbs vbs vbs vbs vbs vbs vbs= visual basic studio visual basic studio visual basic studio visual basic studio visual basic studio.
|
|
|
|
Dec 28 2007, 09:39 AM
Post
#2
|
|
|
Member ![]() ![]() Group: Members Posts: 66 Joined: 13-October 07 From: nigeria Member No.: 162,754 |
oops! sorry i resolved to using that bit when<body background="images/king/sammy.JPG"> wouldnt work. the former(bit) has not encouraged me though.
-------------------- Lost! i havent seen season three. link? link? linK? vbs vbs vbs vbs vbs vbs vbs= visual basic studio visual basic studio visual basic studio visual basic studio visual basic studio.
|
|
|
|
Dec 28 2007, 10:08 AM
Post
#3
|
|
![]() Member ![]() ![]() Group: Members Posts: 97 Joined: 14-July 07 From: Central New York Member No.: 143,655 |
Hey again, king gee!
An easier way to use it, is to use a piece of CSS code without needing a CSS document attached. It'll go between the <head></head> tags and look like this: <style> body { background-image: url("/images/image_name.gif"); background-position: 50% 50%; background-repeat: no-repeat; } </style> Now, let me explain what each of them do! The "background-image" is obviously where your image will go. The "background-position" is how far from each side you want the image. Currently, it's listed as "centered". If you don't include that, its default location is the top-left corner. Then "background-repeat" is if you want the image to appear more than once in the background and where you'd like it to appear. For example, "no-repeat" only has it once on the page, "repeat" has it repeat row by row on your background, "repeat-y" has it repeat along the y-axis (vertical), "repeat-x" has it repeat along the x-axis (horizontal). Good luck and let me know if this works! ps: You can also use "background-color:" if you want your background to be any color other than white, remember to use hex codes, which are often six letter/number combinations, for example, black is: #000000 and you can find thousands more colors here. -------------------- ![]() "I would feel more optimistic about a bright future for man if he spent less time proving that he can outwit Nature and more time tasting her sweetness and respecting her seniority." E. B. White (1899 - 1985) |
|
|
|
Dec 31 2007, 08:23 AM
Post
#4
|
|
![]() Bleepin' Night Watchman ![]() ![]() ![]() ![]() ![]() ![]() Group: BC Advisor Posts: 1,975 Joined: 5-December 05 From: The City of Saint Francis, by the western sea Member No.: 43,307 |
<body background="images/king/sammy.JPG"> Methinks the trouble lies in the URL. Try using this instead: <body background="/images/king/sammy.JPG"> Note the forward slash at the beginning of the image URL. -------------------- Social Lives Are Overrated. |
|
|
|
Dec 31 2007, 09:25 AM
Post
#5
|
|
|
Member ![]() ![]() Group: Members Posts: 66 Joined: 13-October 07 From: nigeria Member No.: 162,754 |
Thanks for the help but i dont seem to be doin something right. tried everything u suggested but it would not work.
these are my codes so far; <html> <head> <title>bidemi" porfolio</title> <meta name="description" content="bidemi's personal statement,curriculum vitae, pictures, e.t.c"> <meta name="keywords" content="my pictures, my music, my friends,my projects"> <style> body { background-image: url("/images/image_sammy.JPG"); background-position: 50% 50%; background-repeat: no-repeat; } </style> </head> <body bgcolor="#0000f"> <p> <center> <font color="white"><font size="4"><marquee>welcome to my website</marquee></font> </center> </p> <img src="/images/king/sammy.JPG" border="2" height="1000" width="600"alt="this is my graduation picture"> </body> </html> -------------------- Lost! i havent seen season three. link? link? linK? vbs vbs vbs vbs vbs vbs vbs= visual basic studio visual basic studio visual basic studio visual basic studio visual basic studio.
|
|
|
|
Dec 31 2007, 01:10 PM
Post
#6
|
|
|
Distinguished Member ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 642 Joined: 4-November 07 From: The Great State of Disarray Member No.: 167,506 |
<html> <head> <title>bidemi" porfolio</title> Suggest you delete the quote mark. <meta name="description" content="bidemi's personal statement,curriculum vitae, pictures, e.t.c"> Suggest you delete , e.t.c. But be sure to keep the end quote. <meta name="keywords" content="my pictures, my music, my friends,my projects"> <style> body { background-image: url("/images/image_sammy.JPG"); Need a space between url and the opening parens? I don't know enough about CSS to be sure. Are you 100% certain that your image name has the extension in capital letters? While the codes themselves aren't usually case sensitive, all of your content will be. background-position: 50% 50%; background-repeat: no-repeat; } </style> </head> <body bgcolor="#0000f"> <p> <center> <font color="white"><font size="4"><marquee>welcome to my website</marquee></font> For good coding practice, suggest you change to the numbers: #FFFFFF and include a second </font> closing tag (see note below). </center> </p> <img src="/images/king/sammy.JPG" border="2" height="1000" width="600"alt="this is my graduation picture"> Need a space between "600" and alt. </body> </html> Hi king gee, If you can't make sense out of anything I've said, please don't hesitate to ask about it. FYI, in the meta tags it generally doesn't matter whether or not you have a space after the comma, but the etc. definitely is not needed. The main purpose of the content and description meta tags is for search engines to pick up on them. They'll ignore the commas and words such as and, the, etc., an, and.... Where you specify font color and size for the marquee, you either need a second font closing tag - </font> - or you should incorporate color and size into one tag, like this: <font color="#FFFFFF" size="4"> That way, you'll need only one closing tag. A general rule to follow is that if there's an opening tag, there should always be a closing tag. There are some exceptions, of course, but you'll rarely run across them. BTW, once you get this image to work as a background picture, I doubt the alt text will show up, since background images don't operate under the same rules as other images. I'm impressed by how quickly you're progressing! -------------------- |
|
|
|
Jan 5 2008, 12:43 PM
Post
#7
|
|
|
Senior Member ![]() ![]() ![]() ![]() Group: Members Posts: 494 Joined: 3-January 06 From: earth Member No.: 48,372 |
creating a main folder, creatin a sub folder in the main folder(image folder-stored mine as king),using a html editor-notepad, and saving in .html. my bit is; <img src="images/king/sammy.JPG" border="2" height="1000" width="600"alt="this is my graduation picture". thank you plenty in advance. Just like creating a webpage on your computer with Notepad--- Keep all images or whatnot to be called up in the HTML document in the SAME folder as the HTML document that uses them... In a folder would be the HTML document. Images etc. ... ![]() That way you can use the simple file name in the img src or whatever... For example-- CODE <img src="untitled.bmp"> Or .jpg or .gif or .png.... Except TTF files on the computer. In the computer example above,Font Face is "Liberate". NOT the TTF file name..... I added the html file to my thumb drive to use in public libraries. I wanted my own font... I've not tried it but maybe one could use special fonts on their websites simply by uploading the needed TTF file(s) to the same directory as the HTML file it will be used in & for Font Face use the appropriate font name... I'll play with that some day to see if it works. As you may know,if a font is not installed on a viewers' computer,if you use a special font it will default back to Times New Roman or Ariel or whatever when they visit your site... It should work on a website. It works on a computer... This post has been edited by medab1: Jan 5 2008, 01:04 PM -------------------- |
|
|
|
Jan 20 2008, 02:57 PM
Post
#8
|
|
|
Member ![]() ![]() Group: Members Posts: 66 Joined: 13-October 07 From: nigeria Member No.: 162,754 |
offcourse! medab, its what i did. i dont know y its not workng 4 me. i even upgraded my browser(from ie6 to ie7) thinking that might be the problem. i havent posted in a while cause i wanted to be sure i did all that was suggested. now, i think i will move up to other things like tables and the like. thank u all for the attempt.
-------------------- Lost! i havent seen season three. link? link? linK? vbs vbs vbs vbs vbs vbs vbs= visual basic studio visual basic studio visual basic studio visual basic studio visual basic studio.
|
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 9th January 2009 - 01:31 AM |