Wetlook World ForumCurrent time: Mon 13/05/24 09:52:12 GMT |
Message # 22857.1.1 Subject: Urk. That CSS was dumb... Date: Wed 07/06/06 09:00:55 GMT Name: Telcontar Email: mrnemesis@ntlworld.com |
Report Abuse or Problem to Nigel at Minxmovies
|
The CSS I wrote made no sense. What it meant was that the table cell containing the desired link would light up regardless of whether the cursor was over the link itself! This leads people to clicking the cell instead of the link due to the false positive feedback!
I remember making that mistake before; the nifty and really logical solution is to replace the table with an unordered list <ul>, one link per <li>, and set every <a> tag to display: block, and make them all the width of the containing <li>. Now you have a visual replica of the old design but in semantic code and that will permit the next trick!
Now: ul.nav a:hover { background: ... ; color: ... } /* change the link on hover */
Because each link tag is now a block the size and shape of a table cell, not only does all the background light up as per before, but the visitor can indeed click anywhere that isn't text, as it's all still part of the link. I had a test case of this at work that was working nicely in both IE 6 and Firefox, but we all got laid off long before the Web site was ever overhauled. The company was bought up but the site still uses bloody frames! |
In reply to Message (22857.1) Re: WasserStoff reworked
By Telcontar - mrnemesis@ntlworld.com Tue 06/06/06 09:32:06 GMT Yeah that works much better! Though you can still write something like this for mouseover effects:
table.sidenav td:hover { background-color: green; color: red } /* only, pick some nice colours ;) */
Much cleaner. I'd also suggest a title such as "Wasserstoff Online" for the main frameset instead of "Neuer Site 2" !!
One other snag, which you get with frames. Supposing I follow a link to your site-seeing page: http://www.wasser-stoff-online.de/siteseeingengl.htm -- what site does that take me to? Since the frameset is now gone! For this reason I avoid frames and recommend server-side template code although SSI would do, except that it would mean breaking your links unless you could associate .htm with PHP, ASP or SSI on your server. The same problem occurs if I middle-click (Firefox) or cmd-click (iCab) to get a link in a new window -- I lose all the navigation. One basic workaround is a "show me the frameset" link that goes back to the homepage, but I decided way back (!) in 2003 when I got my own domain that my site was going to be all PHP-driven and I abandoned frames for good. A good CMS would save you the need to hand-code a site from scratch but I have no idea what's a good one. Just not PostNuke or PHP-Nuke as they're shit. Preferably one that supports useful URLs like /section/page instead all URLs being like index.crap?blah=A30F4F3CE08611...
As for a spam bot free mailto link, there may not be one. I use a contact page on my own site that will run on any *NIX or Win32 host running PHP and it seems to work. I get the odd spam bot mail me with it but they use HTML tags (!?) and I could filter all that out by looking for tags and spitting the mail out. I can give you my generic version if you like.
I think that covers it all? :) |
In reply to Message (22857) WasserStoff reworked
By Robbi - Tue 06/06/06 02:18:11 GMT Website: http://www.wasser-stoff-online.de I thought the Java appletts would cause trouble. Should be working, now. There are still some problems to solve, but at least it works. The stories are not translated, yet and I am still looking for a sulution to provide a spam bot- safe mailto function. |
Report Abuse or Problem to Nigel at Minxmovies
If you enjoy this forum, then please make a small donation to help with running costs:
(you can change amount)
|
[ This page took 0.006 seconds to generate ]