We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
  • Pages:
  • 1
WEB PAGE CODE HELP
Topic Started: Jan 12 2005, 01:12 PM (1,265 Views)
Bluhd Relahyted
Bluhd Relahyted Illness
[ *  *  *  *  * ]
im making a webpage, whats the code when you click an image it goes to the link which its set to, it isnt the same for images on here so could someone help me out please

thnx
Offline Profile Quote Post Goto Top
 
Gornakle
Member
[ *  *  *  *  * ]
Strange.. people are constantly posting the wrong kind of topics in Scripting chat, yet the right ones get posted elsewhere. >_>

Either way, the HTML for a linked image is:

Code:
 
<a href='http://www.somelink.com'><img src='http://www.someimage.com/image.jpg' /></a>
Offline Profile Quote Post Goto Top
 
FearKiller
Member Avatar
www.drewscripts.com
[ *  *  *  *  * ]
The valid HTML code for a linked image is
Code:
 
<a href="http://www.mylilsite.com"><img src="thepathtomylilimage" alt="thealternatetextformylilimage" /></a>
Offline Profile Quote Post Goto Top
 
Stefan
Member Avatar
Mew?
[ *  *  *  *  *  *  * ]
moved to programming & scripting chat
Offline Profile Quote Post Goto Top
 
Bluhd Relahyted
Bluhd Relahyted Illness
[ *  *  *  *  * ]
and can i ask the same thing but to change the background colour please
Offline Profile Quote Post Goto Top
 
Bluhd Relahyted
Bluhd Relahyted Illness
[ *  *  *  *  * ]
still waiting?
Offline Profile Quote Post Goto Top
 
FearKiller
Member Avatar
www.drewscripts.com
[ *  *  *  *  * ]
Bluhd Relahyted
January 12, 2005 04:05 PM
and can i ask the same thing but to change the background colour please

Add this to your html document in the header

Code:
 
<link rel="stylesheet" type="text/css" href="pathtocss" />


Make a new file and call it "whateverthehellyouwant.css" and put this code inside

Code:
 
body {
background-color: #ABCDEF;
}


In the first code change "pathtocss" to the path where the CSS is (that's that new file I told you to create if you didn't know.) Then change ABCDEF to a hex code that meets the color of your needs.

Learn more about HTML and CSS here http://www.htmldog.com
Offline Profile Quote Post Goto Top
 
Bluhd Relahyted
Bluhd Relahyted Illness
[ *  *  *  *  * ]
thnx man, but it isnt for CSS, its for a webpage so its different, do you know that one? thnx
Offline Profile Quote Post Goto Top
 
Bluhd Relahyted
Bluhd Relahyted Illness
[ *  *  *  *  * ]
soory, but can someone please help me out
Offline Profile Quote Post Goto Top
 
FearKiller
Member Avatar
www.drewscripts.com
[ *  *  *  *  * ]
You can use CSS in a webpage and it should be used. HTML without CSS is like a day without sunlight. I recommend the way I said above but if you just wanna use pure html...

Code:
 
<body bgcolor="#ABCDEF">


Change "ABCDEF" to hex code that represents the color of your needs.
Offline Profile Quote Post Goto Top
 
Bluhd Relahyted
Bluhd Relahyted Illness
[ *  *  *  *  * ]
ay it got moved here numbnuts

and thnx for the code killer
Offline Profile Quote Post Goto Top
 
Hero_of_time
I love Emily :wub:
[ *  *  *  * ]
I'd recommed the CSS on your webpage. He showed you how to do it externally, but if you want to add background color to only ONE page, then you can do it internally. Like this:

Code:
 

<style type="text/css">
body {
background-color: #ABCDEF;
}
</style>


You put it between <head> and </head>
Offline Profile Quote Post Goto Top
 
FearKiller
Member Avatar
www.drewscripts.com
[ *  *  *  *  * ]
The better way to do this would be to use this
Code:
 
<style type="text/css">
<!--
body {
background-color: #ABCDEF;
}
-->
</style>

The reason is because of the comment tags. This will make it user friendly to those who view your site with browsers that don't support CSS.

An even better way to do it is to use inline CSS
Code:
 
<body style="background-color: #ABCDEF;">


So many choices :D
Offline Profile Quote Post Goto Top
 
Seth
Member Avatar
I has a pony
[ *  *  *  *  *  *  *  *  * ]
FearKiller
January 13, 2005 12:26 AM
The better way to do this would be to use this
Code:
 
<style type="text/css">
<!--
body {
background-color: #ABCDEF;
}
-->
</style>

The reason is because of the comment tags. This will make it user friendly to those who view your site with browsers that don't support CSS.

An even better way to do it is to use inline CSS
Code:
 
<body style="background-color: #ABCDEF;">


So many choices :D

Huh? :huh: What are you on about? Browsers that don't support CSS will just ignore the rules. You're thinking JS. This is CSS. Putting comment tags in the middle of your CSS will break things.
Offline Profile Quote Post Goto Top
 
ELRocco
Rocco
[ *  *  * ]
you can put commment like this
Code:
 
</style><!--Comment here--><style type='text/css'>

or f you want it to show up on page like this
Code:
 
</style><body>ELRocco wuz here</body><style type='text/css'>


Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Technology Chat · Next Topic »
Add Reply
  • Pages:
  • 1