Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I was wondering if someone could help me understand why I cannot get CSS to work on a hosted site? I am using SPD 2010, Windows Server 2008, and IE-8. After putting my CSS script inside the PlaceHolderTitleAreaClass in the Master Page, I referenced it from a td on the insert template. SharePoint Designer will render the border color, however, the browser will not render the border color when logged in to the hosted site. The same procedure will work in a browser when logged in to my development machine instead. Would CSS be server side code, and be blocked by the hosted site? I also tried an older version of the Master Page, and built a DVWP page from it. The results were the same. Thank you for your help!

share|improve this question

1 Answer 1

up vote 2 down vote accepted

This is probably an authentication issue. Browse to the hosted site and look at the source HTML for the page. Find the reference to your CSS file and check that you can browse to that URL.

If you get a 403 Access Denied, a common cause is forgetting to publish the CSS file as a major version and ensuring it is approved. If that's not it then check your settings for anonymous access.

share|improve this answer
    
Thank you Alex. What I did was add <style type="text/css"> CODE </style> within an ASP content place holder (called PlaceHolderTitleAreaClass) on the Master. Will there still be a reference to the script in the View Source of the page built from the Master? I can't seem to find it. The page that works (on my dev machine) contains the script in the view source -just before it renders the table. The page that doesn't work is missing the script. Thanks again. –  Anonymous Sep 18 '10 at 0:32
    
Hi Alex, Thank you for your help. It is fixed now. I was trying to embed the CSS code directly into the master page, but couldn't get it to work. Then, I created a .css file from notepad, and uploading it into SP. In the head tag of the master page I inserted <link rel="stylesheet" type="text/css" href="something.css"> I still had trouble with it until I entered the full URL path and file name in the href. Then, it worked! Thanks again for your help. –  Anonymous Sep 18 '10 at 4:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.