homepage Welcome to WebmasterWorld Guest from 54.161.236.229
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / WebmasterWorld / Accessibility and Usability
Forum Library, Charter, Moderators: ergophobe

Accessibility and Usability Forum

    
Splash page w/ redirect
WombatReaper




msg:3415086
 6:47 pm on Aug 6, 2007 (gmt 0)

I'm not sure if this is in the right forum or not, but I'll give it a shot anyway.
I'm having a hell of a time getting my site to work in both IE and FF, just as I expected. I'm thinking of creating two versions of the website, one that works in FF and on in IE. Then, make a splash page and have a link to both sites on the splash page. Where the trouble comes in is content.. the only thing different between both sites is going to be the CSS files, is there a way to simplify the content updating process, so that I can just make a change in one file and have it apply to both sites?

Hopefully someone can make sense of what I just said..

Thanks in advance,
Jay

 

cmarshall




msg:3415129
 7:25 pm on Aug 6, 2007 (gmt 0)

Welcome to WebmasterWorld!

A better forum might be the J&A Forum [webmasterworld.com] or the PHP Forum [webmasterworld.com].

There's definitely ways to do it. Don't do multiple versions of the site. I've done that.

You can also use IE Conditional Comments [msdn2.microsoft.com] to load in an override CSS file. The chances are good you only need to tweak a few classes for IE, so the override file can take care of that. I do it all the time. I hate having to do it, as I consider hacks like that to be, well, hacks. However, in the real world, I must do it; especially if I want to get fancy in my presentation.

WombatReaper




msg:3415194
 8:45 pm on Aug 6, 2007 (gmt 0)

Hey, that looks like it could work great, I was planning on just using a tweaked CSS file for IE anyway, but how would I use the comments to load a CSS file? Any examples?

cmarshall




msg:3415200
 8:51 pm on Aug 6, 2007 (gmt 0)

Here's an example taken from a site I'm working on:

<!--[if lte IE 6]>
<style type="text/css">
/* <![CDATA[ */
img#header_shadow {
background-image: none;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="wp-content/themes/sasna/theme_images/logo_bottom.png");
right: 35px;
}
/* ]]> */
</style>
<![endif]-->

In this case, I'm using it to display a PNG file. Simply add any HTML you want in the comments. It can be a <script>, a <style>, a <link>, whatever.

londrum




msg:3415202
 8:52 pm on Aug 6, 2007 (gmt 0)

you just have to place it in your head. make sure you place it after the regular css link though. something like this...

<link rel="stylesheet" type="text/css" href="/stylesheet.css" />
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="/stylesheet-for-IE6.css" />
<![endif]-->

lte IE 6 means that anything 'less than or equal' to IE6 will load the new sheet. so IE6, IE5 and IE4 will all get it.

[edit...]
sorry, we must have been writing our posts at the same time. didn't see the last one!

WombatReaper




msg:3415221
 9:01 pm on Aug 6, 2007 (gmt 0)

Awesome guys, thanks a lot!
I'm doing all my coding offline, using my hard drive as a makeshift host for now, purely because it's faster and easier, and less hassle.. will this work offline? I tried a few different tweaks and I'm not getting it to work, maybe it's just something I'm doing though.

londrum




msg:3415225
 9:04 pm on Aug 6, 2007 (gmt 0)

should do. view the source code of the page and see if it's there. maybe your browser has cached an old version of the page.

WombatReaper




msg:3415226
 9:08 pm on Aug 6, 2007 (gmt 0)

Huh, I cleared my cache and everything, closed the browser, opened it up again, still nothing. Checked the source and it's in there.. what could I be doing wrong?
Sorry for being a pesky noob ^^'

londrum




msg:3415230
 9:12 pm on Aug 6, 2007 (gmt 0)

paste the code you're using onto here so we can see

WombatReaper




msg:3415235
 9:16 pm on Aug 6, 2007 (gmt 0)

Here's the head, is that all you need?


<head profile="http://gmpg.org/xfn/11">
<title>Avalon Architecture and Planning LLC</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<!--[if lte IE 6]>
<link rel="stylesheet" href="iestyle.css" type="text/css" media="screen" />
<![endif]-->
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="en-gb" />
<meta http-equiv="imagetoolbar" content="false" />
<meta name="author" content="Reaper" />
<meta name="copyright" content="Copyright (c) Avalon Architecture 2007" />
<meta name="description" content="The leading architecture firm located in Vancouver, WA" />
<meta name="keywords" content="architecture planning building construction blueprints blueprint plan plans construct architect architects drawing drafting CAD Autocad autodesk" />
<meta name="last-modified" content="Thursday, 26 July 2007 11:08AM PST" />
<meta name="mssmarttagspreventparsing" content="true" />
<meta name="robots" content="index, follow, noarchive" />
<meta name="revisit-after" content="7 days" />
</head>

londrum




msg:3415250
 9:22 pm on Aug 6, 2007 (gmt 0)

it should work as far as i can see.

but remember that it doesn't REPLACE the original stylesheet - it is extra to it. so all your original styles are still in play. it sometimes helps to put !important on the end of the new styles, just to see if they are getting through.

try doing something like this in your IE stylesheet, just to see if it is working...


body { background: red !important; }

WombatReaper




msg:3415254
 9:26 pm on Aug 6, 2007 (gmt 0)

I changed the code in iestyle.css to this:


/* body */
body {
background:red!important;
color:#666;
font:0.75em/100% 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif;
line-height:1.4em;
}

Re-cleared cache, everything. Still doesn't work.

[edited by: WombatReaper at 9:28 pm (utc) on Aug. 6, 2007]

londrum




msg:3415259
 9:28 pm on Aug 6, 2007 (gmt 0)

you are using IE6, i suppose (clutching at straws now)
if you are using IE7 then change IE6 to IE7

WombatReaper




msg:3415261
 9:31 pm on Aug 6, 2007 (gmt 0)

There we go!
Changed it to 7 and the background shows up red.
Don't know why I didn't think to try that sooner..

londrum




msg:3415262
 9:32 pm on Aug 6, 2007 (gmt 0)

thank christ for that. i can go to bed now

WombatReaper




msg:3415268
 9:35 pm on Aug 6, 2007 (gmt 0)

Thanks a million for your help bro, get some good sleep, you deserve it after that ^_^

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Accessibility and Usability
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved