Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help Forums Windows Startup Programs Database Spyware and Malware Removal Guides Computer Tutorials Uninstall Database File Database Computer Glossary Computer Resources
 

Welcome Guest ( Log In | Click here to Register a free account now! )



Register a free account to unlock additional features at BleepingComputer.com
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.
Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

2 Pages V   1 2 >  
Reply to this topicStart new topic
> Html Help
j0nath4n
post Oct 5 2007, 01:02 AM
Post #1


Member
**

Group: Members
Posts: 71
Joined: 26-November 06
From: Someplace where it rains.
Member No.: 97,910



Does anyone know how to create the highlight when hovered like this site?
Go to the top of the page
 
+Quote Post
jpshortstuff
post Oct 5 2007, 12:02 PM
Post #2


WhatTheTech Malware Team
***

Group: Security Colleague
Posts: 180
Joined: 15-June 07
From: UK
Member No.: 136,795



You could do this with JavaScript or with CSS. The site you mentioned uses JS. Here is the code they use for the "New" button:

CODE
<a onmouseout="document.neww.src='images/new2.png'" onmouseover="document.neww.src='images/new2.png'" target="default" href="new/default.htm"><img width="37" height="20" border="0" name="neww" src="images/new2.png"/></a>

As you can see, they have an image for the normal one, and an image for the highlighted one.


CODE
<img width="37" height="20" border="0" name="neww" src="images/new2.png"/>

This image has been given a name - neww.


CODE
onmouseout="document.neww.src='images/new2.png'"
and
onmouseover="document.neww.src='images/new2.png'"

The onmouesout and onmouseover attributes are reasonably self-explanatory, they specify what happens when the cursor hovers over or leaves that image.
document.neww.src refers to the image element we had earlier with the name 'neww' and src refers to the src attribute of that image. So this is changing the source of our image to the highlighted version whenever we hover over it, and back to normal when we leave.

You could do this with CSS as well, but i won't go into that unless you ask specifically for me to.

Hope that helps, just ask for any more detail anywhere.

jpshortstuff


--------------------
Trained at the What The Tech Classroom where you too could learn to help others.


Go to the top of the page
 
+Quote Post
Amazing Andrew
post Oct 5 2007, 01:20 PM
Post #3


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



Just my here, but the page you linked to exhibits what many people would consider bad HTML practices. Among the violations are 1)disabling the right-mouse-click function, 2) using an iframe, 3)using javascript rollovers where CSS would be much better.
A much simpler way to accomplish the highlighted link look would be to add only three little lines of code to your header section:
HTML
<style>
a:hover {text-decoration:none; color: #ffffff;}
</style>


The above code will cause all links to change in color to white when the mouse moves over them, and then revert back to normal when the mouse leaves. In addition, you can specify the text-decoration property using "underline", "overline", "line-through", or "none".

There's a lot you can do with CSS. Check out this page for some ideas for links.

This post has been edited by Amazing Andrew: Nov 20 2007, 03:45 PM


--------------------
Social Lives Are Overrated.
Go to the top of the page
 
+Quote Post
king gee
post Nov 18 2007, 03:28 PM
Post #4


Member
**

Group: Members
Posts: 66
Joined: 13-October 07
From: nigeria
Member No.: 162,754



hello! pls how was the name david chan written on the upper right corner of the home page


--------------------
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.
Go to the top of the page
 
+Quote Post
jpshortstuff
post Nov 18 2007, 03:35 PM
Post #5


WhatTheTech Malware Team
***

Group: Security Colleague
Posts: 180
Joined: 15-June 07
From: UK
Member No.: 136,795



QUOTE(king gee @ Nov 18 2007, 08:28 PM) *
how was the name david chan written on the upper right corner of the home page

It is just an image.

The structure of the whole page is a table, and that title (David Chan) is an image in the top row of the table.


--------------------
Trained at the What The Tech Classroom where you too could learn to help others.


Go to the top of the page
 
+Quote Post
king gee
post Nov 19 2007, 01:51 AM
Post #6


Member
**

Group: Members
Posts: 66
Joined: 13-October 07
From: nigeria
Member No.: 162,754



image?! as in an import from a camera snap shot?


--------------------
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.
Go to the top of the page
 
+Quote Post
Noot
post Nov 19 2007, 10:22 AM
Post #7


Member
**

Group: Members
Posts: 97
Joined: 14-July 07
From: Central New York
Member No.: 143,655



It's an image that was created in an image editing program, such as Photoshop. It's uploaded and put into <img src="image.jpg">, between the quotation marks.


--------------------


"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)
Go to the top of the page
 
+Quote Post
king gee
post Dec 13 2007, 01:41 PM
Post #8


Member
**

Group: Members
Posts: 66
Joined: 13-October 07
From: nigeria
Member No.: 162,754



whats the meaning of urchin.js.
in the source code of the "subject site" theres a line like:
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
what does this mean?


--------------------
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.
Go to the top of the page
 
+Quote Post
jpshortstuff
post Dec 13 2007, 01:50 PM
Post #9


WhatTheTech Malware Team
***

Group: Security Colleague
Posts: 180
Joined: 15-June 07
From: UK
Member No.: 136,795



urchin.js is a JavaScript file. It is located by this file path: http://www.google-analytics.com/urchin.js.
If you copy and paste this file path into your browser window, you will be able to see the contents of the file. It contains many functions and settings that the site will use, and therefore can be grouped together in one file that can be referenced to from many pages that need it.


--------------------
Trained at the What The Tech Classroom where you too could learn to help others.


Go to the top of the page
 
+Quote Post
king gee
post Dec 13 2007, 01:55 PM
Post #10


Member
**

Group: Members
Posts: 66
Joined: 13-October 07
From: nigeria
Member No.: 162,754



also please how were the pages linked?


--------------------
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.
Go to the top of the page
 
+Quote Post
jpshortstuff
post Dec 13 2007, 02:04 PM
Post #11


WhatTheTech Malware Team
***

Group: Security Colleague
Posts: 180
Joined: 15-June 07
From: UK
Member No.: 136,795



Which pages linked to what?

This bit:
QUOTE
src="http://www.google-analytics.com/urchin.js"
is showing where to look for the Javascript file.


--------------------
Trained at the What The Tech Classroom where you too could learn to help others.


Go to the top of the page
 
+Quote Post
king gee
post Dec 13 2007, 02:19 PM
Post #12


Member
**

Group: Members
Posts: 66
Joined: 13-October 07
From: nigeria
Member No.: 162,754



i mean the way the pages are linked.for example i click on ABOUT and stuff about himself displays. i click on contact, a new page comes up.


--------------------
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.
Go to the top of the page
 
+Quote Post
jpshortstuff
post Dec 13 2007, 02:48 PM
Post #13


WhatTheTech Malware Team
***

Group: Security Colleague
Posts: 180
Joined: 15-June 07
From: UK
Member No.: 136,795



QUOTE
href="about/default.htm"


For example, that is the href attribute of the "About" link. The href attribute says where a link will direct you when clicked.


--------------------
Trained at the What The Tech Classroom where you too could learn to help others.


Go to the top of the page
 
+Quote Post
king gee
post Dec 13 2007, 03:05 PM
Post #14


Member
**

Group: Members
Posts: 66
Joined: 13-October 07
From: nigeria
Member No.: 162,754



ok! this is what i mean. the website is made of 8 pages right? i.e new, about, portraits, nature........how were the pages linked to each other.
if i want to use this "urchin" stuff, will i necessarily need to add this bit
<script type="text/javascript">
_uacct = "UA-2112586-1";
urchinTracker();
</script>


--------------------
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.
Go to the top of the page
 
+Quote Post
jpshortstuff
post Dec 13 2007, 03:28 PM
Post #15


WhatTheTech Malware Team
***

Group: Security Colleague
Posts: 180
Joined: 15-June 07
From: UK
Member No.: 136,795



The pages are linked in a completely standard way, just look at the source.

Here is the About button:

CODE
<a onmouseout="document.about.src='images/about1.png'" onmouseover="document.about.src='images/about2.png'" target="default" href="about/default.htm"><img width="46" height="20" border="0" name="about" src="images/about1.png"/></a>


Its all just HTML and a little bit of JS for the appearance, nothing special, and nothing to do with urchin.js here.

Thats all the code that links the pages, theres nothing else special doing that, its as you would expect any site to link the pages.


--------------------
Trained at the What The Tech Classroom where you too could learn to help others.


Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 8th January 2009 - 09:10 PM


Advertise   |   About Us   |   Terms of Use   |   Privacy Policy   |   Contact Us   |   Site Map   |   Chat   |   Tutorials   |   Uninstall List
Discussion Forums   |   The Computer Glossary   |   Resources   |   RSS Feeds   |   Startups   |   The File Database   |   Malware Removal Guides

© 2003-2008 All Rights Reserved Bleeping Computer LLC.