Dadabik Style Sheet does not load in Chrome

egurevich

Member
I am having a very strange problem with the Dadabik page. It loads fine in every browser except for some installations of Chrome. On some computers it looks fine in Chrome as well. But in others it does not load the Dadabik Style sheet so all the fonts look weird and there is no background. It seems that it's not just Chrome by itself, but some kind of a combination of Chrome and something else in Windows. It does not work in Chrome on computers with Vista. However it does work in Chrome on my computer that has Windows XP SP3. Although I have another computer which also has Windows XP SP3 and it doesn't work there as well.
I would appreciate any help on this.
My Dadabik website is here:
http://www.seforimonline.org/seforimdb/
 

egurevich

Member
I figured out what the problem is. There was a curly bracket } missing in one declaration in styles_screen.css and also the semicolon in 2 places. Once I fixed them and reloaded the page it works fine. Important to note that Chrome does not clear its cache very well, so you need to open Chrome, clear its browsing data, then close it, and then reopen it again and go to the website. If you don't close and reopen it then it keeps loading the old style sheet and the problem persists.

Here is the code which I had to change in the style sheet:

.tr_header_login_form{
background-color:#aaaaaa;
font-weight:bold;
color:#ffffff;
}

.input_login_form{
border-width:1px;
border-color: #000000;
border-style: solid;
}
/*******************************************************/


div.break {
page-break-before:always;
}
table.labels {
width: 21cm;
}
td.address {
height: 3.4cm;
width: 10cm;
text-align: left;
vertical-align: top;
margin-top: 10px;
margin-left: 10px;
font-size: 14px
}
td.marginvert {
width: 0.5cm
}
td.marginorizz {
height: 1.2cm
}
 

egurevich

Member
Well I was still having a problem in Chrome on some computers. But I found the culprit.

The problem was in header.php file in the following 2 lines:

They looked like this:

<link rel="stylesheet" href="css/styles_screen.css" type ="text/css" media="screen">
<link rel="stylesheet" href="css/styles_print.css" type ="text/css" media="print">

There was a space between "type" and the equal sign: type ="text/css"

After I got rid of that space everything started loading fine in all browsers. The tags should looks like this:

<link rel="stylesheet" href="css/styles_screen.css" type="text/css" media="screen">
<link rel="stylesheet" href="css/styles_print.css" type="text/css" media="print">
 

egurevich

Member
Well this problem of Chrome not loading the style sheet keeps coming back. All my previous posts where I seemed to have fixed it, only worked for a while, but eventually Chrome would display the page again without the style sheet loaded. It almost seems like every time Google would upgrade Chrome (it upgrades itself automatically) they would break something in it.

I found this post on Google forums about this issue on various sites.
http://www.google.com/support/forum/p/Chrome/thread?tid=118a703312a8a45e&hl=en

I have implemented some suggestions that they have made and now it's working correctly again.

What I have done this time is removed the second style sheet reference for printing in header.php:

it used to say:

[pre]
<link rel="stylesheet" href="css/styles_screen.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/styles_print.css" type="text/css" media="print" />
[/pre]

now it says:

[pre]
<link rel="stylesheet" href="css/styles_screen.css" type="text/css" media="screen" />
[/pre]

Then I cleared all of the browsing data in Chrome and reloaded the page and now it works. I tried this on 2 different computers.

I have also added a second change as a precaution.
I added to the <dadabik installation>/css folder a .htaccess file and in it I specified the following line at the end of the file:

[pre]
addtype text/css .css
[/pre]

This makes sure that the css is always loaded correct content type.

Hopefully this will solve the problem for good, but you never know. It might come back again. Anyone has any other ideas?
 

egurevich

Member
Well apparently none of my ideas worked, because I looked at the web site today from the same computer and it's not loading the style sheet again.
 

egurevich

Member
I just got an idea which did solve the problem without even clearing the cache.
Instead of loading the style sheet from a CSS file I put it directly in header.php.

In header.php I removed the following line:

[pre]
<link rel="stylesheet" href="css/styles_screen.css" type="text/css" media="screen" />
[/pre]

Then I made the style tag inside the <head> section:

<style type="text/css">

.... HERE I PASTED THE CONTENTS OF THE CSS FILE ....

</style>

And now since there is no external file to load Chrome gets the style right as it builds the web page.
 

eugenio

Administrator
Staff member
Any other users had problems with Chrome?
I use Chrome sometime (8.0.552.215 on Mac) but I've never experienced problems
 
Top