Welcome to WebmasterWorld Guest from 107.20.34.173

Forum Moderators: ergophobe

Message Too Old, No Replies

Splash page w/ redirect

     

WombatReaper

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

5+ Year Member



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

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

WebmasterWorld Senior Member 10+ Year Member



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

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

5+ Year Member



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

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

WebmasterWorld Senior Member 10+ Year Member



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

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

WebmasterWorld Senior Member 5+ Year Member



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

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

5+ Year Member



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

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

WebmasterWorld Senior Member 5+ Year Member



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

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

5+ Year Member



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

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

WebmasterWorld Senior Member 5+ Year Member



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

WombatReaper

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

5+ Year Member



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

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

WebmasterWorld Senior Member 5+ Year Member



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

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

5+ Year Member



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

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

WebmasterWorld Senior Member 5+ Year Member



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

WombatReaper

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

5+ Year Member



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

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

WebmasterWorld Senior Member 5+ Year Member



thank christ for that. i can go to bed now

WombatReaper

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

5+ Year Member



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

Featured Threads

Hot Threads This Week

Hot Threads This Month