1

HTML Help

TripleThreatNinja's Avatar TripleThreatNinja9/26/13 12:44 am
9/27/2013 2:13 pm
GameDevJB's Avatar GameDevJB
Hey guys,
I am doing some HTML and i was wondering if anyone new the tags for making a picture background. My current code is <backgroundimg="images/background.jpeg>
but it stays as a solid colour. Please help.
Posted by TripleThreatNinja's Avatar
TripleThreatNinja
Level 29 : Expert Nerd
25

Create an account or sign in to comment.

14

GameDevJB
09/27/2013 2:13 pm
Level 1 : New Explorer
GameDevJB's Avatar
"Deprecated" is making me angry about browsers and os's.
(because I often work with website owners, forum software, security updates to forum software etc.)
I wish they would just leave things alone lol.
What are we talking about ? A few milliseconds, some hierarchy ?
HTML 5 though is becoming better. I wish things never deprecated.
Windows XP for example runs all the software I need for coding, editing, etc.
Does Vista 32 or 64 run it all ? Nope.
Does Win7 32 or 64 ? NOPE.
Does Win8 - Who Cares ! and Nope.
I am stuck (smile) with WinXp Pro Sp3 and have archived all updates.
I've wasted money on Win7 and Win8 computers and returned them. LOL
I find it entertaining to tell them Win8 is junk also. Because it is. Right ? ::nod::

Absolutely hilarious subject
Designing question theory.
Teaching him to learn the affects of each browser compliance and style alone is much needed but the question asked was simple so it had a simple answer.
I guess if he asked how to style it. I would tell him an amazing tutorial.

p.s. I always use the free validation checker at W3.
http://validator.w3.org/
w3 . org is very safe site to learn web coding.
It will even correct your code and output it as css formated which you can copy-paste into your *.htm's etc. Then will require a tiny bit of editing because I think w3 doesn't add the Quotes or something to keep it updated. Which is weird of them when they want updated code. LOL. Their output though is sort of sloppy just beware and use it for research or troubleshooting Good luck.
1
GameDevJB
09/26/2013 1:41 am
Level 1 : New Explorer
GameDevJB's Avatar
He's asking about background image. I doubt he is into CSS or Styles.
Good tip though. Style is the legit way these days.
1
sycoinc
09/26/2013 4:25 am
Level 57 : Grandmaster Programmer
sycoinc's Avatar
to get a background image u need a style either inline stying or the way I had it
1
Paril
09/26/2013 5:27 am
Level 88 : Elite Scapegoat
Paril's Avatar
No you don't. A lot of things can be done in HTML via attributes - that being said however, most of them are deprecated now that style sheets are commonplace. Keep in mind that there was a time where CSS didn't exist but things like backgrounds did.

Anything to do with layout or styling should, indeed, be kept to style sheets. That's the whole idea behind their existence. Learning HTML is nice and all but you'll need CSS and JS to really make any good use of it.
1
sycoinc
09/26/2013 5:32 am
Level 57 : Grandmaster Programmer
sycoinc's Avatar
Its always better to use current techniques and not outdated coding
1
Paril
09/26/2013 6:24 am
Level 88 : Elite Scapegoat
Paril's Avatar
Of course, but for completion sake you can't say that it's impossible to set a background via attributes. It's just not recommended/deprecated.
1
GameDevJB
09/26/2013 1:38 am
Level 1 : New Explorer
GameDevJB's Avatar
Image can be absolute or relative path unless your hosting sux.
Does not need to be same folder but needs to have proper path without typos and needs proper file extension.
You can make td's, tables, bodys, divs, anything have an image and it can be path'd relative or absolute file or url address beginning with http:// and ending with an image.
1
Minecraft-Style
09/26/2013 1:27 am
Level 48 : Master Artist
Minecraft-Style's Avatar
make the <body> into <body style="background:url(yourimage);">
or if you want to make a certain part of the website into a different color try making it <div> or a <span>
1
sycoinc
09/26/2013 1:17 am
Level 57 : Grandmaster Programmer
sycoinc's Avatar

<head>
<style>
body
{
background: #fff url(image.jpg) no-repeat fixed center;
}
</style>
</head>

<body>
Your html and text here
</body>
</html>
1
Rai the Lion
09/26/2013 1:07 am
Level 5 : Apprentice Miner
Rai the Lion's Avatar
<body background="file.png">

Make sure the HTML file and the image file are in the same folder, and that the file name in the HTML and the file name of the actual picture is the same.

The file extension (jpg, png, gif) has to be the same too!

EDIT: Doesn't have to be the body, just anything you want to change.
1
TripleThreatNinja
09/26/2013 1:12 am
Level 29 : Expert Nerd
TripleThreatNinja's Avatar
thank you it was because the picture and file were not in the same spot
1
MN_Surfer
09/26/2013 1:06 am
Level 25 : Expert Crafter
MN_Surfer's Avatar
i think its
<img src="IMAGE NAME.jpg" alt="IMAGE NAME" height="42" width="42"> </img>

Hope It helps

Thanks Mksurferboy
1
DragsZombies
09/26/2013 1:01 am
Level 35 : Artisan Wolf Whisperer
DragsZombies's Avatar
I don't remember how exactly... :I Sorry I couldn't help. I'm learning HTML along with 4 other languages.
1
TripleThreatNinja
09/26/2013 1:06 am
Level 29 : Expert Nerd
TripleThreatNinja's Avatar
Thank you anyway
1
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome