Safari not picking up my external stylesheets
Posted: 26 May 2008 08:26 PM   [ Ignore ]  
Summer Student
Total Posts:  9
Joined  05-26-2008

I was testing the rss function on my site in safari and when I clicked back to the home page, the css was disabled and I have not been able to get it back since. I have 2 stylesheets that you can switch between and Firefox picks up both, and so does IE 6 and 7 (although it’s not pretty in IE at the moment). I had other people look at the site on their computers, and it comes up fine until they click on something or refresh, and it disappears for them. I’ve emptied my cache, I’ve tried writing the full path to the stylesheets, and no one else seems to have this problem on the forums, or on google it seems. I’m pretty sure it’s not the stylesheet switcher since that has been working for awhile without any problems, locally and on the site. It all started after I started messing with the RSS and Atom page templates in EE and testing it in Safari. I’m truly boggled right now, anyone with a clue would be a life saver.

Below in red is the top part of my code in EE, green is the entire top of my source code.

Or you can see for yourself at www.twistofdave.com

{assign_variable:my_weblog=“twist”}{assign_variable:my_template_group=“twistofdave”}<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml” xml:lang=“en” lang=“en”>
<head>
  <meta name=“description” content=“A site dedicated to giving life a much needed twist through writing and web development!” />
  <meta name=“keywords” content=“webdesign, web design, website design, webdevelopment, development, logos, social media, blog, humor, twist, interaction design, WashingtonDC, washington dc, d.c., dc, twistofdave, dave, hamric, david, davidhamric” />
<!—HOORAY FOR SOURCE CODE!—>
<title>~{exp:weblog:info weblog=”{my_weblog}”}{blog_title}{/exp:weblog:info}~</title>
<meta http-equiv=“Content-Type” content=“text/html; charset={charset}” />
<!—Different Stylesheets—>
<link rel=“stylesheet” type=“text/css” href=“http://www.twistofdave.com/css/dark.css” title=“dark” media=“screen,projector” />
<link rel=“alternate stylesheet” type=“text/css” href=“http://www.twistofdave.com/css/light.css” title=“light” media=“screen,projector” />
<link rel=“alternate” type=“application/rss+xml” title=“RSS” href=”{path={my_template_group}/rss_2.0}” />
<link rel=“alternate” type=“application/atom+xml” title=“Atom” href=”{path={my_template_group}/atom}” />
<!—[if IE 6]>
  <link rel=“stylesheet” type=“text/css” media=“screen,projector” href=“http://www.twistofdave.com/css/ie6dark.css” />
  <link rel=“alternate stylesheet” type=“text/css” href=“http://www.twistofdave.com/css/ie6light.css” title=“ie6dark” media=“screen” />
<![endif]—>
 
 
 
 
</head>


<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml” xml:lang=“en” lang=“en”>
<head>
  <meta name=“description” content=“A site dedicated to giving life a much needed twist through writing and web development!” />
  <meta name=“keywords” content=“webdesign, web design, website design, webdevelopment, development, logos, social media, blog, humor, twist, interaction design, WashingtonDC, washington dc, d.c., dc, twistofdave, dave, hamric, david, davidhamric” />
<!—HOORAY FOR SOURCE CODE!—>
<title>~Twist of Dave~</title>
<meta http-equiv=“Content-Type” content=“text/html; charset=utf-8” />
<!—Different Stylesheets—>
<link rel=“stylesheet” type=“text/css” href=“http://www.twistofdave.com/css/dark.css” title=“dark” media=“screen,projector” />
<link rel=“alternate stylesheet” type=“text/css” href=“http://www.twistofdave.com/css/light.css” title=“light” media=“screen,projector” />
<link rel=“alternate” type=“application/rss+xml” title=“RSS” href=“http://www.twistofdave.com/index.php?/twistofdave/rss_2.0/” />
<link rel=“alternate” type=“application/atom+xml” title=“Atom” href=“http://www.twistofdave.com/index.php?/twistofdave/atom/” />
<!—[if IE 6]>
  <link rel=“stylesheet” type=“text/css” media=“screen,projector” href=“http://www.twistofdave.com/css/ie6dark.css” />
  <link rel=“alternate stylesheet” type=“text/css” href=“http://www.twistofdave.com/css/ie6light.css” title=“ie6dark” media=“screen” />
<![endif]—>

 
 
 
 
</head>

Profile
 
 
Posted: 27 May 2008 02:48 AM   [ Ignore ]   [ # 1 ]  
Grad Student
Avatar
Rank
Total Posts:  48
Joined  02-29-2008

Are you experiencing this problem in Safari for Windhoos or for OSX?

On OSX I don’t seem to get the CSS problem, but then again.. I haven’t been able to find the RSS feed to duplicate the conditions.

If you are using Safari for Windhoos it could just be a bug.

 Signature 
Profile
 
 
Posted: 27 May 2008 07:19 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  9
Joined  05-26-2008

Safari for OSX.

Well it’s gone from strange to stranger. It looks like my old placeholder page is there now instead of my new site, so there’s the reason there’s no rss feed, or my css stylesheet not being pulled.

Profile
 
 
Posted: 27 May 2008 08:08 AM   [ Ignore ]   [ # 3 ]  
Summer Student
Total Posts:  9
Joined  05-26-2008

This problem is not solved yet, it just so happened that my hosting service migrated servers last night, and somehow my site reverted to an older version. I’ll reply when they fix this issue. Who knows, maybe this will solve my css problem.

Profile
 
 
Posted: 27 May 2008 11:41 AM   [ Ignore ]   [ # 4 ]  
Summer Student
Total Posts:  9
Joined  05-26-2008

The site is back and running, and so is the issue of safari (in OSX) not recognizing my css. When I first opened it in safari it worked, but clicking any of te links or refreshing made it become a text only version, and I can’t get it back.

Profile
 
 
Posted: 27 May 2008 12:22 PM   [ Ignore ]   [ # 5 ]  
Grad Student
Avatar
Rank
Total Posts:  48
Joined  02-29-2008

I’m getting the same issue on Firefox for Windhoos.

But I’m wondering how you link to the pages in EE. I see that all your links are pointing to a file with a .html extension. You either have to have some mod_rewrite magic going on at the backend or you’re not using EE to it’s fullest potential. Have you tried putting all your CSS in EE templates and loading them from there? (same goes for your javascript btw…)

The funny thing is: When I go to http://www.twistofdave.com/index.php I get an unstyled page, but when I go to http://www.twistofdave.com/index.php/ I see all the styles again.  ohh

EDIT:
After checking some of the links on the homepage I’m guessing the entire structure of your site as well as the way you navigate through it is a bit messed up. URL’s like http://www.twistofdave.com/index.php?/twistofdave/yeah_thats_right_im_a_blogger_now/ aren’t really how EE generates them… EE doesn’t add the questionmark as far as I know.

So could you perhaps tell us a bit more about how your site is strustured and where you load your CSS and HTML from?

Greetz,

Wizz

 Signature 
Profile
 
 
Posted: 27 May 2008 12:42 PM   [ Ignore ]   [ # 6 ]  
Summer Student
Total Posts:  9
Joined  05-26-2008

Different people have seen the same issue with my site and FF, but I have yet to see it.

That’s very weird about it working when typing in http://www.twistofdave.com/index.php/ as opposed to /index.php.

As of now, the only pages that are using EE are the index page, rss page, atom page and the comments page. The index page links to html pages that I have on my site (so that I would have clean looking URLs), as well as the css and javascript files. So it is very likely I’m not using EE to it’s fullest potential. I will try putting them in EE tonight (which I’ve tried with the css before, but maybe I was missing something). Still, if I can pull up my css stylesheets by typing their locations in the address bar, they should be able to pull those styles.

Thanks for the heads up, hopefully putting the whole site in EE takes care of this issue.

Profile
 
 
Posted: 27 May 2008 12:46 PM   [ Ignore ]   [ # 7 ]  
Summer Student
Total Posts:  9
Joined  05-26-2008

all the html files sit in the same file where the index.php file is. I create them in text program and uploaded them as html files as opposed to creating templates in EE. EE automatically created the ? marks as far as I can tell.

Profile
 
 
Posted: 27 May 2008 12:56 PM   [ Ignore ]   [ # 8 ]  
Grad Student
Avatar
Rank
Total Posts:  48
Joined  02-29-2008
hamricde - 27 May 2008 12:42 PM

Different people have seen the same issue with my site and FF, but I have yet to see it.

That’s very weird about it working when typing in http://www.twistofdave.com/index.php/ as opposed to /index.php.

As of now, the only pages that are using EE are the index page, rss page, atom page and the comments page. The index page links to html pages that I have on my site (so that I would have clean looking URLs), as well as the css and javascript files. So it is very likely I’m not using EE to it’s fullest potential. I will try putting them in EE tonight (which I’ve tried with the css before, but maybe I was missing something). Still, if I can pull up my css stylesheets by typing their locations in the address bar, they should be able to pull those styles.

Thanks for the heads up, hopefully putting the whole site in EE takes care of this issue.

It’s very easy to make “clean” url’s using EE.

Make a template-group called contact and paste the HTML for your contact-page in the index for that group. Now you can access your contact page by going to ***.com/index.php/contact. Same goes for your other pages.

If you want to remove the index.php part from the URL check this wiki-post, using mod_rewrite it’s very easy to do…

About the css: I usually have a template-group called ‘styles’ where I collect all the CSS I use in my site. Adding a new css-template is the equivalent of creating a new CSS-file.

For example: If I have a template called layout in the styles group, this is how you would call it.

<link rel="stylesheet" type="text/css" href="{stylesheet='styles/layout'}" />


The EE template parser makes sure that it’s calling the right URL.

 Signature 
Profile
 
 
Posted: 27 May 2008 01:03 PM   [ Ignore ]   [ # 9 ]  
Summer Student
Total Posts:  9
Joined  05-26-2008

That is very helpful. So I guess the moral of the story is create the entire site in EE. Makes sense. I will attempt to make those changes tonight. I’ll reply when done, and hopefully that should fix it.

Profile
 
 
Posted: 27 May 2008 01:07 PM   [ Ignore ]   [ # 10 ]  
Grad Student
Avatar
Rank
Total Posts:  48
Joined  02-29-2008

If you’re thinking about recreating the entire site, it would be wise to follow some of the tutorials on Boyink’s Blog... It helped me out a lot when I first started with EE.

 Signature 
Profile
 
 
Posted: 27 May 2008 01:19 PM   [ Ignore ]   [ # 11 ]  
Summer Student
Total Posts:  9
Joined  05-26-2008

Briefly looking over boyink’s blog and tutorial, he says “Note: this approach does require the query module, which isn’t included in the Core version of ExpressionEngine.”

I’m currently using the core version and am not trying to pay for the full version since. Is that going to be a problem?

Profile
 
 
Posted: 27 May 2008 01:30 PM   [ Ignore ]   [ # 12 ]  
Grad Student
Avatar
Rank
Total Posts:  48
Joined  02-29-2008

He has a lot of blog posts about putting up a website using EE. The one I followed didn’t use the query module (at least I think it didn’t).

Check this post to start at the very beginning. It’s chapter 1 of a 17-part tutorial (though a big part of it is beyond the scope of any ‘normal’ site)

 Signature 
Profile
 
 
Posted: 27 May 2008 04:40 PM   [ Ignore ]   [ # 13 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  197
Joined  04-29-2007

It looks like you may have multiple index templates.  Looking at the source of the URLs mentioned above (one with “/” and one without), there are 2 CSS files which don’t appear in one and do in the other.

 Signature 

carvingCode | carving unique nooks in the web™ | blog

Profile
 
 
Posted: 27 May 2008 07:40 PM   [ Ignore ]   [ # 14 ]  
Summer Student
Total Posts:  9
Joined  05-26-2008

I took a different approach. Since I had a lot of stylesheets that were being imported into my main ones, I found http://expressionengine.com/forums/viewthread/52546/#256592 this to be the best method.

It looks like all I needed was to add ‘/’ to locate my style sheets. Before it was ‘css/dark.css’. It needed to be ‘/css/dark.css’.

Works in IE, FF and safari so far.

Profile
 
 
   
 
 
‹‹ CSS Help      FF and IE6 issues ››
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64983 Total Logged-in Users: 36
Total Topics: 82024 Total Anonymous Users: 16
Total Replies: 440860 Total Guests: 211
Total Posts: 522884    
Members ( View Memberlist )
Newest Members:  hotglassladyariepChris Bandytony leodennisbaldwinhazlett_davidkpspokeli9htcluizmbent