Karl`s PC Help Forums

hover and display problem
SRD - 6-2-2008 at 08:16

I have used a template from Paul O'Brady over at Sitepoint to set up a website and I am trying to use some of his code to allow content to display when the mouse is hovered over a list entry. This works quite well here: http://www.merelitfest.co.uk/2003/2003res.html (at least it does in my current editions of FF and IE7) allowing the reader to scroll down through the poem when the cursor is placed on the poem's title. (1st, 2nd & 3rd place in the open competition).
But here http://myweb.tiscali.co.uk/simonriv...DS/history.html it doesn't work so well. (that is a work in progess)

I know I have used inline elements when I should have used block in some places, but have countered that with the style, and the second site shows that I have used both with the same effect.

Whichever, it's not very good and I'm looking at doing it differently (without linking to a new page).

I think I'm up against a brick wall with HTML and CSS and my js isn't up to it. Does anyone have any ideas?


dr john - 6-2-2008 at 15:26

The history.html link doesn't work - page not found.

Incidentally, it would be a VERY good idea on the poetry pages to give visitors some sort of a strong hint that on mouseover more content is displayed. At present it will all happen by accident and confuse them.


SRD - 6-2-2008 at 15:46

Sorry, try this:
http://myweb.tiscali.co.uk/simonriverdale/MADS/history.html

I know about the mystery meat navigation, until I'd got it working properly I didn't want to advertise it.

As you've probably noticed I've been banned from T, I can't even view the forum, so if anyone comes up with anything can you let me know?

Thanks

Simon.


Quaver - 6-2-2008 at 18:37

Quote:
Originally posted by SRD
As you've probably noticed I've been banned from T

How did that happen?:o
Quote:
I can't even view the forum

You don't have to log-in to view the forum thoughconfused2
Quote:
so if anyone comes up with anything can you let me know?

Dr.John has replied at 4:26pm today.


SRD - 6-2-2008 at 19:21

Quote:
Originally posted by Quaver
Quote:
Originally posted by SRD
As you've probably noticed I've been banned from T

How did that happen?:o
Officially I don't know, but rumour has it for bumping the thread about the way T may/may not have been blocking access to this forum.
Quote:

Quote:
I can't even view the forum

You don't have to log-in to view the forum thoughconfused2
When I used my usual links into the forum I got the message 'You are not currently logged in. Please log in and try again' whenever I tried it ust returned me to that message.
Quote:

Quote:
so if anyone comes up with anything can you let me know?

Dr.John has replied at 4:26pm today.
Thanks, I've just succeeded in getting in to view, but if I try to do anything (including enlarging text size) I get sent into a loop with the "You are not logged in etc....".


Quaver - 6-2-2008 at 19:29

Quote:
Originally posted by SRD
Officially I don't know, but rumour has it for bumping the thread about the way T may/may not have been blocking access to this forum.

Oooopslips_sealed
I'm sure it's temporary;)

Quote:
Originally posted by Dr.John

A list item cannot contain things like an h2 or paragraghs. You have a bunch of paragraphs between the last </li> for anniversaries and the closing </ul>, which are causing you a few problems

There are other show/hide techniques that would allow you to do this sort of thing however. I'll see if I have a link to any, but Stu at cssplay has several that work, of course,, and I used a variation on one here
Balancing Chemical Equations
Note that that is a very old page and has a few strange bits - like no doctype, which actually makes it work the way I wanted! (It does of course work with a doctype as well, Stu used xhtml if I remember correctly, but it could work with regular html doctypes)

PS Paul O'Brian, not brady


Quaver - 7-2-2008 at 12:02

Glad to see you are back at T'swaveysmiley
What's with RSI onboardconfused2


SRD - 7-2-2008 at 12:04

I suspect it's some kind of monitoring system.


Quaver - 7-2-2008 at 12:04

Quote:
Originally posted by SRD
I suspect it's some kind of monitoring system.

roffle


dr john - 7-2-2008 at 16:16

Hi Simon

have you tried logging in to tiscali recently, to see if you really are banned? I regularly have problems logging in and switching browsers sometimes helps.


SRD - 7-2-2008 at 16:26

I haven't tried today, I'm still sulking at having the ban lifted after less than 24 hours, how can I hold my head up in giron's company with a record like that?


Quaver - 7-2-2008 at 17:38

Quote:
Originally posted by SRD
I'm still sulking at having the ban lifted after less than 24 hours,

Don't sulk, it's only mischievous T's doinghuggydo
Quote:
how can I hold my head up in giron's company with a record like that?

You got off, he didn'tlaughy_smilie
It's not a record, just a little cautionwaveysmiley


SRD - 11-2-2008 at 12:31

Hi dr john, I'm just looking at the example you posted in another place and I've got a couple of queries:
1: You have href="#more" in the link, what is this and why is it required?
2: If I offset the hidden section to appear to the right by using position: absolute; and top and left to fix the position it no longer drives the footer area down but shows over it. Any idea why? and can I make it drive the footer down?


dr john - 11-2-2008 at 17:52

href="#more"
It's a dummy reference to go nowhere, to have a link that the mouse can click on. That way the little bit of javascript - onclick="this.hideFocus=true" onblur="this.hideFocus=false" has something to react to. But the onblur bit, by some weird bit of luck, doesn't seem to work without a doctype. In Stu's original version, if you moved the mouse away, it hid the content again. So when I stuck it on this old page, not noticing that I didn't have a doctype, it accidentally did exactly what I wanted - click to show it, click elsewhere to re-hide it! Talk about good luck!

Don't use position absolute, do it the way I've done it, if possible without the doctype, otherwise the users have to hold the mouse over the area to read it. If the lack of a doctype screws up the rest of the page, then you're stuck with using a doctype.

The css to use is all in the showmore.css file - the bits of text that get shown / hidden are between the em tags.


Googling on show/ hide javascript should turn up lots of similar examples.

Here's another of Stu's show/hide things I borrowed. He is just soooo inventive!
http://www.windrushers.org.uk/location.htm
mouseover the From the North, From the South etc bits.
It's a much more complex bit of code, all in the slider.css file. too complex for us ordinary mortals to quickly analyse, so I never bothered to, apart from finding out what bits I had to use. (It works best if you bring the mouse up from the bottom of the page over the From the XYZs, rather than from the top.)

PS Stu has a new site where he's experimenting with javascript, so he might have another few show/hide scripts over there.


SRD - 11-2-2008 at 19:21

Thanks, yes I'd sussed the css, it was the lack of a #more that threw me, I didn't know if it was somewhere you'd stuck a bit of code which was inherited from somewhere.
You're quite correct that position: absolute doesn't work but position: relative does and giving the encompassing div a height drives the footer down, I think; I'd put up an example but I deleted something important whilst shifting content around and I've got to start again.

I'm not sure if I need a doctype, I suspect so as I'm using Po'B's XHTML 3 col/header/footer template which doesn't work with HTML 4.0 and I'm currently wrestling with the way your css and his can be amalgamated (and I don't mean I'm only using one css file but that there may well be conflicting styles I've got to reconcile).


dr john - 12-2-2008 at 10:49

Well, rather than have to change a lot of things and have bits of Paul's layout crash and burn, just accept that the user has to keep the mouse in place, it's no big deal, and use the doctype. I simply didn't bother altering my old page out of laziness.


Quaver - 12-2-2008 at 23:02

Quote:
Originally posted by SRD
I suspect it's some kind of monitoring system.

Your 'monitoring system' seems to have disappeared, and I see you are now back to being a Rantipole again:D
Hope you'll forgive T and come backwaveysmiley


SRD - 13-2-2008 at 07:56

I expect I've 'served' my 5 day ban from the BBS forum, but I expect McPratt and the hag are still in charge so I can't see me hurrying back soon, besides, folks here and over at 'the lot' are fine, what is there to tempt me back?


Quaver - 13-2-2008 at 10:55

Quote:
Originally posted by SRD
I expect I've 'served' my 5 day ban from the BBS forum,

It was just a 1 day suspension.
Quote:
but I expect McPratt and the hag are still in charge

Only the support forum;)
Quote:
folks here and over at 'the lot' are fine, what is there to tempt me back?

I miss reading your commentswaveysmiley