style sheet not working

Questions and answers about ShopSite Custom Templates

style sheet not working

Postby ginid3460 » Sun Jan 09, 2011 12:43 pm

I just followed the video on how to upload a custom template. Everything seemed to go fine. The images, html and css files are all loaded. But when I view the store page that has the custom template attached, the divs are there, but the page is not showing the styles at all. I double checked that the style sheet is uploaded to the publish folder and that it is linked correctly in the template. All looks fine. ??? Here is the page that is not working: http://www.georgiadirect.biz/index.html

Thanks in advance for any help.
ginid3460
 
Posts: 4
Joined: Sun Jan 09, 2011 12:38 pm

Re: style sheet not working

Postby Jim » Sun Jan 09, 2011 4:20 pm

Here is a section of the style sheet for that page
=====================================
charset "utf-8";
width: 1000px;
margin-right: auto;
margin-left: auto;
margin-top: 20px;
background-color: #FFF;
}
background-image: url(../media/header_GD.jpg);
height: 204px;
background-repeat: no-repeat;
width: 1000px;
position: relative;
}
background-color: #D2D2D2;
text-align: center;
font-size: 95%;
line-height: 110%;
padding-top: 4px;
padding-bottom: 4px;
}
clear: both;
======================================
Note that there are no style names just the attributes. My guess is that you used the # notation for the styles and had the # as the first character of the line. ShopSite templates use the # as a comment indicator when it is the first character of the line and drops that line in the published file. So when you use the # notation for styles you need to add a space character as the first character of the line and the # as the second. ShopSite will then know that it isn't a comment and will output that line in the published file.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: style sheet not working

Postby ginid3460 » Sun Jan 09, 2011 5:21 pm

That was it! Thanks so much. Too bad nothing was in the documentation to let me know about that. The #sign is normal to use in style sheets, so it should have been something that would come up often, right?
ginid3460
 
Posts: 4
Joined: Sun Jan 09, 2011 12:38 pm

Re: style sheet not working

Postby Jim » Sun Jan 09, 2011 9:31 pm

I have only seen a couple of cases where the # sign caused problems in a template, so it doesn't occur too often. I did a search of the help and couldn't find any reference to the # being used as a comment when the first character in a line of the template. I'll log that for the documentation people to fix.

Glad you got it working.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 112 guests