3 replies [Last post]
ch1zra
Offline
newbie
Last seen: 13 years 5 weeks ago
Joined: 2008-08-16
Posts: 2
Points: 0

Hi Smile
I have this code :

<div style="position: fixed; right: 10px; bottom: 5px; background: transparent; color: #cccccc; font-size: 9px; font-family: FixedSys; font-weight: normal;">
	<a href="#">\m/
	<span>
		<div id="downmenu">
		<a href="index.php">News <=</a><br>
		<a href="index.php?display=Quotes">Quotes <=</a><br>
		<a href="index.php?display=About">About <=</a><br>
		<a href="index.php?display=OpRules">OP Rules <=</a><br>
		<a href="index.php?display=UserRules">User Rules <=</a><br>
		<a href="index.php?display=Connect">Connect <=</a><br>
		<a href="index.php?display=Contact">Contact <=</a><hr>
		 © 2008. <a href="irc://irc.krstarica.com/MetalHeads">#Metalheads</a> crew<br>
		 design by ch1zra
		</div>
	</span>
</a>
</div>

with this css to go along :

#downmenu {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	position: fixed;
	bottom: 15px;
	right: 5px;
	top: auto;
	width: auto;
	color: #666666;
	text-align: right;
	padding: 10px;
	z-index: 100;
}
 
a span {
	display:none;
}
 
a:hover span {
	display:block;
	position:fixed;
	bottom: 20px;
	right: 5px;
	border:1px solid #444;	
}

I don't know are those Z-indexes needed there, but I don't think they cause problems...

anyway, what goes on :
I've "banned" all IE users (it's a small site of certain IRC channel community, we all hate IE, and so on...). FFox displays nicely downright "\m/" which shows navmenu when hovered.
but, in Opera (v9.27) there are problems. when link is hovered, id shows the navmenu, but when I hover link inside

it dissapears.
I could stick it to be shown all the time, but I like the hover show/hide moment of it, so I'd prefer any fix if possible Smile

ty in advance

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 30 weeks 5 days ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

Try using valid html! A DIV

Try using valid html! A DIV is not allwed withing a SPAN, for instance. Without valid html you have no complaint, because the standards do not apply to invalid html.

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

ch1zra
Offline
newbie
Last seen: 13 years 5 weeks ago
Joined: 2008-08-16
Posts: 2
Points: 0

I apologise for my

I apologise for my ignorance, but I'm more of a coder, less a styler.
in this special case, this part of job fell on my shoulders, so i had to do it.

is there any CSS solution to this matter, 'cause i need that hover-popup like that.
I could use some javascript, but I rly hate JS, and it takes much more code than CSS.
btw, the code above works just fine in ffox, and in opera also works show.hiding, except the part of hovering link within span.

ty again for info so far.

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 30 weeks 5 days ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

ch1zra wrote:I apologise for

ch1zra wrote:

I apologise for my ignorance, but I'm more of a coder, less a styler.
in this special case, this part of job fell on my shoulders, so i had to do it.

Well the only way to do it is to do it right. And doing it right means valid html. The "How To" forum on this site will tell you how to validate your html and your CSS.

Quote:

is there any CSS solution to this matter, 'cause i need that hover-popup like that.

Without valid html there is no CSS solution because CSS rules just don't apply. There is no standard. Various browsers will correct the error different ways, and they are perfectly entitled to do that however they want, so what works in one browser may not, and often does not, work in every or any other browser.

You are a programmer so you should know you have to follow the rules with computers or it won't work. Why are you suprised if this applies to html just as it does wih "c" or java?

Quote:

I could use some javascript, but I rly hate JS, and it takes much more code than CSS.

If the html errors preclude building a valid document tree even JS may not help since JS has to browse the tree.

Quote:

btw, the code above works just fine in ffox,

IOW, FF happens to error correct in a way you like. But since there is no standard for this there is no reason to expect other browsers will.

If you want to at least have a basis for complaining about a browser you have to feed it standards compliant code, just as you have to write semantically valid java if you want it to compile.

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.