473,386 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Trouble with CSS Rollovers.

Okay, In the comps.language.javascript newsgroup, I was convinced to
use CSS Rollovers instead of javascript. The first rollover went
great. Although I can't get the text to align vertically in the
middle, It's a much cleaner way to do it and it works okay.

However, my second rollover is not as good. This one has no text over
the button, and the CSS looks like this:
a.go:link{
background-image: url(images/Home_08.jpg);
text-decoration: none;
height: 30px;
width: 41px; }

a.go:visited {
text-decoration: none;
height: 30px;
width: 41px; }

a.go:active {
text-decoration: none;
height: 30px;
width: 41px; }

a.go:hover{
background-image: url(images/Home_08_over.jpg);
text-decoration: none;
height: 30px;
width: 41px; }
It's pretty much the same one as my first one, but without the extra
text attributes. My HTML looks like this:
<TD width="41">
<a class="go" href="#">&nbsp;</a>
</TD>
My problem is that when I display my page, nothing shows up in that
cell until I move the mouse over it, and then the rollover image shows
up. When I move it off the cell -- poof -- no image again. I checked
the filename and everything is correct, but no image is showing when
the cursor is not in the section.

This, of course, is not acceptable. Can anyone please help me? Thanks
so much!

Sep 24 '05 #1
14 1852
I finally figured it out. What I had to do, since there was no text in
the anchor (<A>) was add the following to my CSS file:

a.logo{
background: url(images/Home_10.jpg) no-repeat;
text-decoration: none;
height: 68px;
width: 135px;
}

Now it shows up even though I don't have any text in the link. :0) I
hope this helps somebody else struggling with this!

Sep 24 '05 #2
"webguru" <ra**********@hotmail.com> wrote:
<TD width="41">
<a class="go" href="#">&nbsp;</a>
</TD>
My problem is that when I display my page, nothing shows up in that
cell until I move the mouse over it


Your problem is that you are abusing tables and CSS. Tables are for
marking up tabular data, and key to proper usage of CSS is that it's
optional, thus your page should work without it.

--
Spartanicus
Sep 24 '05 #3
I don't understand what you mean by abusing tables. What's optional?
I started with a .PSD graphics, sliced it and saved it for the web.
That produced the table I am using with the images, and I am using CSS
to produce the rollover on the buttons.

Sorry, I am a newbie at this. Is there a better way to do this?

Thanks,

webguru

Sep 24 '05 #4
Oops, I actually meant I had to add this text. I grabbed the wrong
class. :0/

a.go{
background: url(images/Home_08.jpg) no-repeat;
text-decoration: none;
height: 30px;
width: 41px;
}

Sep 24 '05 #5
"webguru" <ra**********@hotmail.com> wrote:
I don't understand what you mean by abusing tables.
Again: Tables are for marking up tabular data.
What's optional?
Again: CSS.
I started with a .PSD graphics, sliced it and saved it for the web.
That produced the table I am using with the images
Image slicing is sooo 1996, high time for you to catch up with the
times.
, and I am using CSS
You are ABusing CSS.
to produce the rollover on the buttons.

Sorry, I am a newbie at this. Is there a better way to do this?


Better way to do what?

--
Spartanicus
Sep 24 '05 #6
webguru wrote:
Okay, In the comps.language.javascript newsgroup, I was convinced to
use CSS Rollovers instead of javascript.
Good plan.
a.go:link{
a.go:visited {
a.go:active {
a.go:hover{


Your classes are out of order. "Las Vegas Has Animals." LVHA ...

--
-bts
-When motorcycling, never follow a pig truck
Sep 24 '05 #7
Els
Beauregard T. Shagnasty wrote:
webguru wrote:
Okay, In the comps.language.javascript newsgroup, I was convinced to
use CSS Rollovers instead of javascript.


Good plan.
a.go:link{
a.go:visited {
a.go:active {
a.go:hover{


Your classes are out of order. "Las Vegas Has Animals." LVHA ...


<cough> ;-)
Las Vegas Forest Has Animals...

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Sep 24 '05 #8
Els wrote:
Beauregard T. Shagnasty wrote:
webguru wrote:
Okay, In the comps.language.javascript newsgroup, I was convinced to
use CSS Rollovers instead of javascript.


Good plan.
a.go:link{
a.go:visited {
a.go:active {
a.go:hover{


Your classes are out of order. "Las Vegas Has Animals." LVHA ...


<cough> ;-)
Las Vegas Forest Has Animals...


But .. but .. there is no forest in Las Vegas! <cough> <choke>

--
-bts
-When motorcycling, never follow a pig truck
Sep 24 '05 #9
Beauregard T. Shagnasty wrote:
a.go:link{
a.go:visited {
a.go:active {
a.go:hover{

Your classes are out of order. "Las Vegas Has Animals." LVHA ...


<cough> ;-)
Las Vegas Forest Has Animals...

But .. but .. there is no forest in Las Vegas! <cough> <choke>


A heard this:
"LoVe & HAte" and "LoVe, Fuck, HAte" :)
Easier to remember :) IMHO :)

--
Janusz 'Kali' Kaliszczak
+ pies rasy *jumnik*
=> http://www.deviantart.com/view/18982956/ <= GG#52055
Sep 24 '05 #10
Janusz 'Kali' Kaliszczak wrote:
Beauregard T. Shagnasty wrote:
>a.go:link{
>a.go:visited {
>a.go:active {
>a.go:hover{

Your classes are out of order. "Las Vegas Has Animals." LVHA ...
[Els]<cough> ;-)
Las Vegas Forest Has Animals...


But .. but .. there is no forest in Las Vegas! <cough> <choke>


A heard this:
"LoVe & HAte" and "LoVe, Fuck, HAte" :)
Easier to remember :) IMHO :)


And you also have to remember .. is it the third letter of the first
word and second letter of the last word, or do I have that backwards?
LOHT... ? :-)

Most mnemonics use the first letter of each word, though I don't think
there is a real rule governing that...

--
-bts
-Visit the zoo in Las Vegas
Sep 24 '05 #11
Els
Beauregard T. Shagnasty wrote:
Els wrote:
Beauregard T. Shagnasty wrote:
webguru wrote:

Okay, In the comps.language.javascript newsgroup, I was convinced to
use CSS Rollovers instead of javascript.

Good plan.

a.go:link{
a.go:visited {
a.go:active {
a.go:hover{

Your classes are out of order. "Las Vegas Has Animals." LVHA ...


<cough> ;-)
Las Vegas Forest Has Animals...


But .. but .. there is no forest in Las Vegas! <cough> <choke>


AFAICT there isn't even a Las Vegas... :P

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Sep 24 '05 #12
Beauregard T. Shagnasty wrote:
And you also have to remember .. is it the third letter of the first
word and second letter of the last word, or do I have that backwards?
LOHT... ? :-)

Most mnemonics use the first letter of each word, though I don't think
there is a real rule governing that...


But I know that there should be LVFHA, but those rules let me just
remind the sequence

--
Janusz 'Kali' Kaliszczak
+ pies rasy *jumnik*
=> http://www.deviantart.com/view/18982956/ <= GG#52055
Sep 24 '05 #13
On Sat, 24 Sep 2005 14:19:31 GMT, "Beauregard T. Shagnasty"
<a.*********@example.invalid> wrote:
But .. but .. there is no forest in Las Vegas! <cough> <choke>


So where do all the tigers live ?
Sep 25 '05 #14
BTS,

Thanks for your positive input. I appreciate somebody actually being
helpful instead of just posting abnoxious comments without backing them
up. God speed.

Webguru

Sep 26 '05 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Lorne Cameron | last post by:
I've put together a rough copy of what will be my site's menu bar, but I'm not sure if I've done the rollovers correctly (I got the code from HTMLcodetutorial.com I think). Check the look and code...
3
by: gallery | last post by:
I also cross-posted this in comp.infosystems.www.authoring.html. I think it's more appropriate here. I read somewhere that you can get Tim Murtaugh's Mo' Betta Rollovers to work in Firefox using...
10
by: idiotprogrammer | last post by:
Hi, there, I'm trying to do something, and part of the problem is that I don't know how to describe the effect. One block will have a list of links stacked over one another and separated by p...
2
by: Frances Del Rio | last post by:
Hi, I while back I was having a problem with rollovers, even though I do them in a very conventional way: function roll(i) { document.src = eval(i + "_roll.src") } // in which value passed...
3
by: Shahid Juma | last post by:
Hi, Is it possible to do roll overs over an area of an image. I know you can setup up a hotspot but can a roll over be done on that particular hotsop. Additionally, when the image changes on the...
3
by: Norman Swartz | last post by:
Rollovers on a web page I created were instantaneous on my computer when the page was loaded directly from my hard drive, but were painfully slow when loaded from the web. However, on another...
0
by: webguru | last post by:
Okay, In the comps.language.javascript newsgroup, I was convinced to use CSS Rollovers instead of javascript. The first rollover went great. Although I can't get the text to align vertically in...
7
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - Why are my Rollovers so slow? ----------------------------------------------------------------------- Images...
12
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - Why are my rollovers so slow? ----------------------------------------------------------------------- Images...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.