473,406 Members | 2,816 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,406 software developers and data experts.

mouseover problem

roN
Hi,

If you go to http://inetgate.ch/new/test/template.htm and move the mouse
over the links on the left top, you see that the text background stays the
same as on mouse out. if i just add a text backgnd on hovr, it just lights
up the text backgnd when i'm over the image...how cam i make the text
backgnd transparent that it's always the same as the div behind?
Thank you!
roN
Jan 6 '07 #1
11 1687
On 2007-01-06, roN <NO****@example.comwrote:
Hi,

If you go to http://inetgate.ch/new/test/template.htm and move the mouse
over the links on the left top, you see that the text background stays the
same as on mouse out. if i just add a text backgnd on hovr, it just lights
up the text backgnd when i'm over the image...how cam i make the text
backgnd transparent that it's always the same as the div behind?
Just use background: transparent on .nav_point a instead of the colour,
and delete the background-color line from .nav_point a:hover.
Jan 6 '07 #2
roN wrote:
>
If you go to http://inetgate.ch/new/test/template.htm and move the mouse
over the links on the left top, you see that the text background stays the
same as on mouse out.
Why are you doing this with JavaScript, not CSS :hover rules? There is
no effect at all when JS is disabled.

--
Berg
Jan 6 '07 #3
roN
Bergamot wrote:
roN wrote:
>>
If you go to http://inetgate.ch/new/test/template.htm and move the mouse
over the links on the left top, you see that the text background stays
the same as on mouse out.

Why are you doing this with JavaScript, not CSS :hover rules? There is
no effect at all when JS is disabled.
how do i hover the whole div then? thank you for that hint!

roN
Jan 7 '07 #4
roN wrote:
Bergamot wrote:
>roN wrote:
>>>
If you go to http://inetgate.ch/new/test/template.htm and move the mouse
over the links on the left top

Why are you doing this with JavaScript, not CSS :hover rules?

how do i hover the whole div then? thank you for that hint!
Start with better code.

First off, your DOCTYPE is triggering quirks mode in all browsers, so
results can be unpredictable. Try HTML 4.01 Strict instead.
http://hsivonen.iki.fi/doctype/

Second is the code is invalid, which doesn't help get consistent results
across browsers. You cannot have a <divinside an <aelement. <ais
inline and can only contain other inline elements. <divis block.
http://validator.w3.org/
http://jigsaw.w3.org/css-validator/

The effect you are trying to achieve is also known as CSS buttons. There
are oodles of examples on the web, several can be found at
http://css.maxdesign.com.au/listamatic/

Note that using unordered lists for navigation menus has become the
norm, as it's generally considered semantically more correct than just a
series of anonymous <aelements.

--
Berg
Jan 7 '07 #5
roN
Bergamot wrote:
roN wrote:
>Bergamot wrote:
>>roN wrote:

If you go to http://inetgate.ch/new/test/template.htm and move the
mouse over the links on the left top

Why are you doing this with JavaScript, not CSS :hover rules?

how do i hover the whole div then? thank you for that hint!

Start with better code.

First off, your DOCTYPE is triggering quirks mode in all browsers, so
results can be unpredictable. Try HTML 4.01 Strict instead.
http://hsivonen.iki.fi/doctype/

Second is the code is invalid, which doesn't help get consistent results
across browsers. You cannot have a <divinside an <aelement. <ais
inline and can only contain other inline elements. <divis block.
http://validator.w3.org/
http://jigsaw.w3.org/css-validator/

The effect you are trying to achieve is also known as CSS buttons. There
are oodles of examples on the web, several can be found at
http://css.maxdesign.com.au/listamatic/

Note that using unordered lists for navigation menus has become the
norm, as it's generally considered semantically more correct than just a
series of anonymous <aelements.
Okay,

thank you very much for those hints! I've tuned it a little and uploaded it
again to: http://inetgate.ch/new/test/template.htm and i have another
question: is there an html property to ad a small space between the <li>
elements? I would like to separate them a little just by 1 or 2 pixels.
Thanbk you!

Jan 8 '07 #6
roN wrote:
Bergamot wrote:
>>Second is the code is invalid, which doesn't help get consistent results
across browsers. You cannot have a <divinside an <aelement. <ais
inline and can only contain other inline elements. <divis block.
http://validator.w3.org/
http://jigsaw.w3.org/css-validator/
>
Okay,

thank you very much for those hints! I've tuned it a little and uploaded it
again to: http://inetgate.ch/new/test/template.htm and i have another
question: is there an html property to ad a small space between the <li>
elements? I would like to separate them a little just by 1 or 2 pixels.

Not an HTML property, but a CSS property, like those you are already
using in abundance. Try:
#navcontainer li { margin-bottom: 1px; }

BTW: Note that your absolute positioning will suffer when text grows (in
quantity or font size), and with or without content, the fixed-width
approach might not work as well as you hope.

I didn't look at your original code, but I've seen it now. I presume you
know you can move all your styling to the external stylesheet. Yes?

You've still (at this moment) got a few validation errors.

GL! HTH
--
John
Jan 8 '07 #7
John Hosking wrote:
>
Note that your absolute positioning will suffer when text grows
Absolute positioning is a boon to designers, but a bane to users. :-(

--
Berg
Jan 8 '07 #8
roN
Bergamot wrote:
John Hosking wrote:
>>
Note that your absolute positioning will suffer when text grows

Absolute positioning is a boon to designers, but a bane to users. :-(
Hm yeah but before i was told NOT to design with tables anymore and to use
divs instead, even in this newsgrounp... that's confusing me a bit
now... :o
--
roN
Jan 9 '07 #9
Bergamot <be******@visi.comwrote:
>Absolute positioning is a boon to designers, but a bane to users. :-(
In practice absolute positioning is often mis/badly understood and
misused which results in very fragile code. But absolute positioning is
an excellent tool if understood and used properly.

--
Spartanicus
Jan 9 '07 #10
roN wrote:
>
before i was told NOT to design with tables anymore and to use
divs instead, even in this newsgrounp... that's confusing me a bit
Not everything needs to be specifically positioned. Letting stuff fall
where it does naturally (a.k.a. static positioning, or Normal flow) is
often the best thing to do. Sometimes all you need is an extra container
to hold multiple divs, then (some) things can take care of themselves.

For the rest, see:
http://www.w3.org/TR/CSS21/visuren.h...tioning-scheme

--
Berg
Jan 9 '07 #11

Hi,

To fully support CSS 1.0 and 2.0, etc.. while designing your website
don't use tables. Simple as that, using tables and css is just simple
unprofessional. :)

Just my two pickles in a jar.
--
CatBones

XHTMLIT.COM - PSD TO
XHTML/CSS CONVERSION SERVICE (\"HTTP://WWW.XHTMLIT.COM\")
Get your Design (.PSD or .PNG) converted into valid XHTML & CSS fast
and easy.
We cut, crop and professionally hand code it within 24 hours or your
money back guaranteed.
Visit http://www.hostingforum.ca today

Jan 9 '07 #12

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

Similar topics

3
by: richk | last post by:
For some reason when I add additional buttons a 3rd button and beyond i cant get the effect to work and I get errors...I cant understand why... <SCRIPT LANGUAGE = "javascript"><!-- if...
14
by: J. Makela | last post by:
Hallo. This should be a pretty entertaining question for you *real* javascript writers.. I, being the lowly photoshop guy at an ad agency made the mistake of actually saying "HTML" in a...
5
by: JB | last post by:
I am struggling to figure out a way to allow one element to be dragged, but still capture 'mouseover' events on other elements. I've created a simple example to demonstrate what I mean:...
1
by: Martin Pöpping | last post by:
Hello, I want to design a mouseover text using the following example: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="de"> <head>...
3
by: Annette Acquaire | last post by:
I have and image map with a dozen hotspot links on it that I'm trying to get to open a new image over existing one on mouseover of each COORD. The only thing I was able to do was swap image on...
23
by: Schannah | last post by:
I'm trying to create a design which mimics the Radiohead website in the action on this page, but the problem is that they use PHP for the effect and I have no idea about PHP. I'm very amateur: fairly...
10
by: jjamjatra | last post by:
I am struggling with a event model handling problem in Javascript that shows up only in Firefox. I have 2 little websites I'd like you to take a look at: ...
2
by: markszlazak | last post by:
I'm a relatively slow response of table cells changing their background color with mouseover/our in IE6 (Win 2K) but the response is fine (fast) in Firefox. Why? The code is below. Sorry about the...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.