Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, 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.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

New Html Help


  • Please log in to reply
7 replies to this topic

#1 king gee

king gee

  • Members
  • 67 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:nigeria
  • Local time:09:45 PM

Posted 28 December 2007 - 09:33 AM

hi! merry christmas in arrears. i have started building my personal web site using html codes. thanks to a whole bunch of nice guys(dialer,ip,noot,amazing A&random u :thumbsup:).
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.
there is something about the future, it changes anytime you look at it because you looked at it. And that changes everything else.

BC AdBot (Login to Remove)

 


#2 king gee

king gee
  • Topic Starter

  • Members
  • 67 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:nigeria
  • Local time:09:45 PM

Posted 28 December 2007 - 09:39 AM

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.
there is something about the future, it changes anytime you look at it because you looked at it. And that changes everything else.

#3 Noot

Noot

  • Members
  • 98 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:Central New York
  • Local time:10:45 PM

Posted 28 December 2007 - 10:08 AM

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! :thumbsup:


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.
Posted Image

"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)

#4 Andrew

Andrew

    Bleepin' Night Watchman


  • Moderator
  • 8,259 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:Right behind you
  • Local time:07:45 PM

Posted 31 December 2007 - 08:23 AM

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

#5 king gee

king gee
  • Topic Starter

  • Members
  • 67 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:nigeria
  • Local time:09:45 PM

Posted 31 December 2007 - 09:25 AM

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>
there is something about the future, it changes anytime you look at it because you looked at it. And that changes everything else.

#6 Dialer

Dialer

  • Members
  • 642 posts
  • OFFLINE
  •  
  • Gender:Female
  • Location:The Great State of Disarray
  • Local time:07:45 PM

Posted 31 December 2007 - 01:10 PM

<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! :thumbsup:

#7 medab1

medab1

  • Members
  • 844 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:earth
  • Local time:10:45 PM

Posted 05 January 2008 - 12:43 PM

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

Posted Image

That way you can use the simple file name in the img src or whatever...

For example--

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

Edited by medab1, 05 January 2008 - 01:04 PM.

Learn to take screenshots & add them to your posts. :thumbup2:

https://www.bleepingcomputer.com/forums/t/43088/how-to-capture-and-edit-a-screen-shot/#entry4532851

Learn to use Google Search.  :busy:

Make full system images to restore to if your computer goes bonkers.


#8 king gee

king gee
  • Topic Starter

  • Members
  • 67 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:nigeria
  • Local time:09:45 PM

Posted 20 January 2008 - 02:57 PM

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.
there is something about the future, it changes anytime you look at it because you looked at it. And that changes everything else.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users