Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Bidding Directory   High Bandwidth Dedicated Servers   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 01-03-2005, 07:48 PM   #1 (permalink)
DOS
Senior Member
 
DOS's Avatar
 
Join Date: 08-03-04
Posts: 1,077
iTrader: 0 / 0%
Latest Blog:
None

DOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to behold
Rollover Effect

I was wondering if you could use Photoshop to create a rollover effect for links. I want to do something along the lines of what this site has at the left side. See how the item goes from white to red when you hover over it? How can I make that?
DOS is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 01-03-2005, 08:17 PM   #2 (permalink)
Contributing Member
 
Pimpen 2010's Avatar
 
Join Date: 10-13-03
Location: Pffffft
Posts: 8,857
iTrader: 0 / 0%
Latest Blog:
None

Pimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nice
Send a message via AIM to Pimpen 2010 Send a message via Yahoo to Pimpen 2010
That's done via CSS.

*Moved to Coding*
__________________
Hummer Forums
Trick It Out
Pimpen 2010 is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-03-2005, 08:24 PM   #3 (permalink)
No Longer Here
 
Join Date: 09-27-03
Location: State College, PA
Posts: 9,354
iTrader: 0 / 0%
Latest Blog:
None

Jazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebody
You can view source on that page to see how they did it.

<div id="myMenu"><a href="index.php">&nbsp;&curren; News</a></div>

Then look at the stylesheet to see the css for "myMenu" - abandonia.com/fonts.css

Just look at the three sections of the stylesheet for "#myMenu".
Jazzee is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-03-2005, 09:28 PM   #4 (permalink)
Inactive
 
seonewbee's Avatar
 
Join Date: 05-12-04
Posts: 520
iTrader: 0 / 0%
Latest Blog:
None

seonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really nice
You need this code to make the rollover like they did. You will have to
specify your own padding, font, etc

a {

text-decoration: none; /* This turns off underlining */
display: block; /* This makes the rectangle color area */
width: 100%; /* This tell it to be all the width */
}
a:hover { /* This is the rollover effect. */
background-color: #AD0000; /* This changes background color */
color: white; /* Changes the text color */
}
seonewbee is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-04-2005, 12:48 AM   #5 (permalink)
Contributing Member
 
DragonEye's Avatar
 
Join Date: 10-13-03
Location: Belgium
Posts: 316
iTrader: 0 / 0%
Latest Blog:
None

DragonEye is liked by somebodyDragonEye is liked by somebodyDragonEye is liked by somebodyDragonEye is liked by somebodyDragonEye is liked by somebody
Send a message via MSN to DragonEye
well,

you can if you have photoshop with imageready. You should click the imageready button in photoshop and the image will be transferred to IR where you can add those rollovers. I would not recommend it though, the code is quite messy.

DragonEye
DragonEye is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-04-2005, 04:52 PM   #6 (permalink)
DOS
Senior Member
 
DOS's Avatar
 
Join Date: 08-03-04
Posts: 1,077
iTrader: 0 / 0%
Latest Blog:
None

DOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to behold
Quote:
Originally Posted by seonewbee
You need this code to make the rollover like they did. You will have to
specify your own padding, font, etc

a {

text-decoration: none; /* This turns off underlining */
display: block; /* This makes the rectangle color area */
width: 100%; /* This tell it to be all the width */
}
a:hover { /* This is the rollover effect. */
background-color: #AD0000; /* This changes background color */
color: white; /* Changes the text color */
}
This looks good. It is css? There will be no other css on the page so do i have to wrap that in <css> or something?
DOS is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-04-2005, 05:59 PM   #7 (permalink)
Contributing Member
 
Pimpen 2010's Avatar
 
Join Date: 10-13-03
Location: Pffffft
Posts: 8,857
iTrader: 0 / 0%
Latest Blog:
None

Pimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nice
Send a message via AIM to Pimpen 2010 Send a message via Yahoo to Pimpen 2010
Yah, that's CSS. There is a way to do it besides the adding a new file, but I highly recommend that, cause then when you change one thing it'll be good for all pages.

Then when you make a new page, add this to every page of the site to make it good for the stuff on the page:
<link rel="stylesheet" href="filenameandlocationhere.css" type="text/css">
__________________
Hummer Forums
Trick It Out
Pimpen 2010 is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-05-2005, 08:41 AM   #8 (permalink)
Inactive
 
evilregis's Avatar
 
Join Date: 08-06-04
Location: Ontario
Posts: 669
iTrader: 0 / 0%
Latest Blog:
None

evilregis is a jewel in the roughevilregis is a jewel in the roughevilregis is a jewel in the roughevilregis is a jewel in the roughevilregis is a jewel in the roughevilregis is a jewel in the rough
Send a message via ICQ to evilregis
There is no <css> tag, but you can either add the css into the document using (inside the <head> tag):

Code:
<style type="text/css"> a { text-decoration: none; /* This turns off underlining */ display: block; /* This makes the rectangle color area */ width: 100%; /* This tell it to be all the width */ } a:hover { /* This is the rollover effect. */ background-color: #AD0000; /* This changes background color */ color: white; /* Changes the text color */ } </style>
Or, as Pimpen said, link to an external stylesheet, which is preferred. It's easier to maintain, and it gets cached that way. So you would save everything between the <style> tags in a file and use the code that Pimp noted in your <head> tag of every page.
evilregis is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-05-2005, 06:12 PM   #9 (permalink)
No Longer Here
 
Join Date: 09-27-03
Location: State College, PA
Posts: 9,354
iTrader: 0 / 0%
Latest Blog:
None

Jazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebody
FYI: Just using this code that seonewbee posted will make all links on the page have this effect. You need to use classes if you only want this on the nav links.
Jazzee is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-05-2005, 06:17 PM   #10 (permalink)
DOS
Senior Member
 
DOS's Avatar
 
Join Date: 08-03-04
Posts: 1,077
iTrader: 0 / 0%
Latest Blog:
None

DOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to beholdDOS is a splendid one to behold
Quote:
Originally Posted by Jazzee
FYI: Just using this code that seonewbee posted will make all links on the page have this effect. You need to use classes if you only want this on the nav links.
Yes, I want classes. Seems css is something I should spend some time reading about.

Thanks for the help.
DOS is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-05-2005, 06:23 PM   #11 (permalink)
No Longer Here
 
Join Date: 09-27-03
Location: State College, PA
Posts: 9,354
iTrader: 0 / 0%
Latest Blog:
None

Jazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebody
Instead of using

a {..stuff here..
and
a:hover {..stuff here..

use

a.nav {..stuff here..
and
a.nav:hover {..stuff here..


Then on your links in the page use

<a class="nav" href="..
Jazzee is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-05-2005, 07:28 PM   #12 (permalink)
Inactive
 
seonewbee's Avatar
 
Join Date: 05-12-04
Posts: 520
iTrader: 0 / 0%
Latest Blog:
None

seonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really nice
Has anybody tried targeting?

div.menu a. {
....
}

div.menu a.hover{
....
}
This way you do not have to put a class on every link. You could replace "div" with "td"

What the above means is that a div with the class of menu that contains an anchor / link will look the way you specified. Anchors in other parts of the document will not look this way.

You might want to put your menu in a list
<ul>
<li><a .....>text</a>
<li><a ....>text2</a>
....
</ul>

Have fun

Last edited by seonewbee : 01-05-2005 at 07:57 PM.
seonewbee is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-05-2005, 11:46 PM   #13 (permalink)
Contributing Member
 
DragonEye's Avatar
 
Join Date: 10-13-03
Location: Belgium
Posts: 316
iTrader: 0 / 0%
Latest Blog:
None

DragonEye is liked by somebodyDragonEye is liked by somebodyDragonEye is liked by somebodyDragonEye is liked by somebodyDragonEye is liked by somebody
Send a message via MSN to DragonEye
You might also consider doing it using XML behaviours

It's a very nice way of doing rollovers, I haven't used the system myself but I have done some tests and I'm definately going to use it on my future sites.

Here is a URL where you can find out:

http://www.w3schools.com/xml/xml_behaviors.asp



DragonEye
DragonEye is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-06-2005, 09:05 PM   #14 (permalink)
Inactive
 
seonewbee's Avatar
 
Join Date: 05-12-04
Posts: 520
iTrader: 0 / 0%
Latest Blog:
None

seonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really niceseonewbee is just really nice
Doesn't that require javascript? Won't work if javascript is turned off. CSS is better.
seonewbee is offline  
Add Post to del.icio.us
Reply With Quote
Old 01-07-2005, 12:31 AM   #15 (permalink)
Contributing Member
 
DragonEye's Avatar
 
Join Date: 10-13-03
Location: Belgium
Posts: 316
iTrader: 0 / 0%
Latest Blog:
None

DragonEye is liked by somebodyDragonEye is liked by somebodyDragonEye is liked by somebodyDragonEye is liked by somebodyDragonEye is liked by somebody
Send a message via MSN to DragonEye
Sorry, post removed, already posted it
DragonEye is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
image rollover???? ball420 Web Design Lobby 2 03-02-2007 05:48 PM
Css - TD Rollover Pimpen 2010 Coding Forum 12 03-30-2005 10:50 PM
Text to appear somewhere on rollover edbarton Coding Forum 47 03-07-2004 06:13 AM
Rollover Image Pimpen 2010 Web Design Lobby 18 11-04-2003 10:51 AM
Help me eliminate a rollover with CSS Rick Web Design Lobby 8 10-19-2003 07:12 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 04:35 AM.
© Copyright 2008 V7 Inc