Forum Moderators: not2easy

Message Too Old, No Replies

What I REALLY wish I could do with CSS -

I suppose it will happen someday....

         

vkaryl

5:24 pm on Aug 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm responsible for the town's website. I don't provide the content, I just do the "mechanics" of the site itself and the updates of the content as provided by others. Of course, content is easy compared to the mechanics!

Right now, it's a framed site. There's a lot of info on it, and having the nav in the left sidebar frame with the pages opening in the main frame is pretty much the only sensible way to handle it. This keeps people on the site, which is of course at least part of the purpose. The offsite links (to relevant entities out of town, and to certain commercial interests) open in a new browser window - and there are clear "instructions" by those links that to get back to the town site, the individual just needs to close the new window. It all works okay.... the navigation is provided by a "decent" if not spectacular js menu, and I have the list of links as text links in a footer at the bottom of every page other than offsites. It's pretty well covered, I think.

What I REALLY wish I could do with CSS:

1. Make a menu with popopens that works in all browsers. I found one on a site linked from A L*** A**** (I think), but not only does it not work in IE of any version, it also is problematic in Opera 6 and NS 6. I haven't found another one.

Why do I need this? Because of the amount of info on the site, the current menu has 6 main sections, with 14 sub-sections spread out over them. If I use one of the css menu options that works with most browsers (except some of the REALLY obscure ones), I have a list of "top-level" selections and all of the sub-levels showing, which makes the view unwieldy in the extreme, and doesn't really make for an unobtrusive, attractive solution either.

2. Make the pages selected from the sidebar menu or bottom text links open in the "main page section" but not using frames. I did see and play with the "css open in 'right frame'" from a thread here a while back, but seems as if it uses buttons to "open" and "close" the display of the new "page" which is fairly counter-intuitive I think. I played with it some, but I'm not a real great css-techie as yet, and I couldn't figure out how to tweak it to behave like frames without BEING frames.

I'm sure that there are sites around that might have information I could use, I'm just timestrapped at the moment as far as in-depth "surfing-searching" goes. If any of you great folks have some links which might send me in the right direction, I'd appreciate the help.

Or maybe I'm going to have to wait for CSS3 and the sky to fall on IE users? [See, that's the MAIN problem: 98% of the people who use the town's website use IE. NONE of them (other than I/myself/and me!)use NS/Moz/Opera. The other 2% use mac browsers.]

[Edit for typos.... and again! AUUUGHH!]

createErrorMsg

12:59 am on Aug 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Make a menu with popopens that works in all browsers

Have you checked out ALA's "Suckerfish Dropdowns" and a subsequent article on doing 'drop'menus horizonatally, creativly called, "Horizonatal Drop Menus"? With the addition of just a small bit of JS, it produces drop menus that work in IE. If you're going to use them, it's as good a method as any (and certainly better than ALL javascript).

<added>A slimlined CSS menu could conceivably free you from frames altogether, as it's speedy load time might make templatizing the site so the menu is included with PHP or SSI and the content changes for the given pagemore practical than frames. Just a thought.</added>

vkaryl

1:21 am on Aug 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



cEM: yes, suckerfish et al were where I started more or less. I decided that just using js menus (considering the massively weighted percentage of IE users on the site in question) was easier in the long run.

My post above was simply wishful thinking. The menu situation is less problematic than the frame situation actually. (See above statement re percentages.) The load time is minimal due to the host/server I'm using. As I said: wishful thinking....

Now, as to your second point: I just tonight (when a failed appointment handed me a couple of hours of time) played with that very option. It works and works quickly even when I plug in a TON of text and graphics. I think it might work VERY VERY WELL overall as soon as I have the block of time needed to re-manipulate a hundred pages or so. (Which will happen pretty soon y'know - RETIREMENT IS ONLY 14 WORKING DAYS AWAY! YAAAAYYYYYY! Um.... Am I happy? Oy. You COULD say that....)

You know the most interesting thing about all of this? No sooner do I post something than someone mails me or stickies me a reference that starts me thinking in some other direction. While this does not always result in usable code, pages, whatever, it DOES promote actual THINKING. So when I start whining, you guys just keep hitting me upside the head, okay?

[Apropos of all of that in a way, what would happen if you put a php include using variables taken from left sidebar links into the right section of a css-not-framed page, so that the include pulled the appropriate content depending on the variable into ONLY THAT SECTION of the page? Would that be possible? I don't know. But I might have to find out.... If it worked, it might be "like frames" without the frames.]

createErrorMsg

1:57 am on Aug 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The simplest way (I think) to use PHP is to write one template page (probably 'index.php') that has all of the elements in it that will remain on all pages of the site. So in your instance, you would hard code the structure, header, menu, footer, etc, then inside the <div> that would normally hold the content, you add the <?php?> that includes the content for that page. The link in the menu can pass variables to the <php include()?> line as in...

<a href="index.php?page=firstlink">First Link</a>

...which passes the variable $page with a value of 'firstlink' to the page index.php. When index.php reloads after that link is clicked, it now has a value for $page, which can be used to substitute new content like this...

<?php $content=$_GET['page']; include($content . ".htm")?>

...which GETs the variable value, appends an .htm extension onto it and will now take the contents of firstlink.htm and plug them into the page whereever the above php code is.

Please note that there are far better PHP methods than this, which is the most basic use of PHP and, as I understand it, is riddled with security issues. Still, you can see the potential.

To finally get around to answering your question, this method doesn't swap out the content while leaving the rest of the page alone, like frames do. Here, the whole page reloads, and as it does so, it adds different content based on the variable it gets in the URI. However, if the menu were sufficiently small, the reload would be fast, and much of it would be in the cache after the home page anyway.

vkaryl

2:13 am on Aug 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That's what I thought would happen, after I thought about it some more....

And that might be more effort etc. than needed - it's similar to templating as you earlier pointed out, and more complex overall.

Simpler is normally to be preferred.

vkaryl

2:27 am on Aug 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Okay - that for the moment takes care of the frameset situation.

But popopens. Sorry - suckerfish ad infinitum ad nauseam doesn't get it. Popopens are like js menus: there's a top level header and when you mouseover it, it expands the associated levels how ever many of them there may be. Lots of nice js implementations out there doing same, but as I said before, only on CSS one and it absolutely DOES NOT WORK on IE - which of course (considering the percentages....) is the important thing....

TheBlueEyz

10:10 am on Aug 10, 2004 (gmt 0)

10+ Year Member



vkaryl, yes, it does work on IE. There's some associated Javascript that forces it to work properly with IE.

I DO use this menu on one of my websites and it works perfectly in every single browser I have ever seen.

You need to read that ALA article more closely.

vkaryl

5:20 pm on Aug 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It won't work in IE without the js. That's what I meant and didn't specify properly - typing too fast I guess. But thanks TheBlueEyz for bringing it to my attention.

Regardless, if I'm going to use a "little bit" of js to make it work in IE (which is 98% of the user base), I might just as well use an all js one and those who have js disabled have text links.

Which reminds me to add: I have yet to receive ONE COMPLAINT from anyone about not being able to use the site due to having js turned off. I have two feelings about this: either I did an OUTSTANDING job of making the site usable overall (not all that likely), or 99.9% of the 98% who are IE users do NOT have js disabled (not that unlikely considering who they are mostly....)

ronin

6:18 pm on Aug 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



99.9% of the 98% who are IE users do NOT have js disabled

I think this is a reasonable conclusion.

Most IE users aren't interested enough in the OS or the software to start investigating their options, so whatever comes switched on as a default usually stays switched on.

According to my own webstats, in the last six months (since Feb 12th) 93% of my visitors have accessed my site using some version of IE (either 5.0, 5.01, 5.5 or 6.0), but 99.52% of all my visitors (including the ones that weren't using IE) had JavaScript switched on.

Those percentages relate to a survey group of just over a quarter of a million visitors, of which 10% were repeats - so it's not an ideal sample, but big enough - I think - to draw a safe conclusion that the vast majority of IE users have JS activated.

vkaryl

10:51 pm on Aug 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi ronin -

WAY bigger sample than mine! I sent out a questionnaire to those who are registered for email updates. Out of 243 emails, 195 mailed me back. 192 of those use IE of some flavor (most were IE 6+) and the other 3 use a mac browser ("whatever came with my machine" so I don't necessarily know whether IE for mac or something else - and maybe THEY don't either...)

None of them had any trouble with the menu on the site. All of them used the sidebar menu in preference over the text links.

*shrug* It's not a problem on this one site. That's the only conclusion I come to. And I'm not going to extrapolate further than that.

trillianjedi

11:01 pm on Aug 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Out of 243 emails, 195 mailed me back.

That's an amzing response rate vkaryl - good work!

vkaryl

11:13 pm on Aug 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks tj - actually this is common for this site. This little town is 90% (out of 400 cabins) summer vacation, and the website is the only source of info year round for people. It's a nice thing, that folks are so involved!