Vra

enter image description here

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ItemDetails.aspx.cs"  Inherits="namespacename" Debug="true" MasterPageFile="~/_layouts/default.master" %>

<%@ Assembly Name="Microsoft.SharePoint.ApplicationPages, 
 Version=14.0.0.0, Culture=neutral,
 PublicKeyToken=71e9bce111e9429c" %>

Issue I am facing is Css is not getting applied to the page.

although checked in page view source there css is attached .

</title><link rel="stylesheet" type="text/css"   href="/_layouts/1033/styles/Themable/search.css?rev=Uoc0fsLIo87aYwT%2FGX5UPw%3D%3D">
<link rel="stylesheet" type="text/css" href="/_layouts/1033/styles/Themable/corev4.css?  rev=iIikGkMuXBs8CWzKDAyjsQ%3D%3D">

I am having blank site and this page is deployed to layout folder of SharePoint 2010. How to resolve the css issue?

Was dit nuttig?

Oplossing 2

Just resolved it,

by changing default.master to v4.master.. it works !!

 <%Page.... MasterPageFile="~/_layouts/v4.master" %>

from this url got to know ShrePoint 2010 uses v4.master as default master page:

http://office.microsoft.com/en-in/sharepoint-designer-help/customize-a-master-page-to-brand-your-site-HA102449505.aspx

Ander wenke

A couple of things to note; Even though link is a void element the doctype used in SharePoint does not support it. So please consider closing your tags. Another thing is the space in the beginning of your querystring on corev4.css.
Both these should not directly cause your problem, but it's worth looking into.

Now, for checking if stylesheets are properly applied I usually follow this approach:

  1. Fire up Chrome.
    (Yes it's not supported by SharePoint, but the Chrome Developer Tools are just too good).
  2. Check Resources tab, if your stylesheet is properly included it will show up here under your correct frame and Stylesheets, if it is not listed then something is wrong.
  3. In that case, check Network tab to check:
    1. Is the file even listed?
    2. Is the HTTP status code correct?
    3. Is the Content-Type in Response Headers set to text/css?
Gelisensieer onder: CC-BY-SA met toeskrywing
Nie verbonde aan sharepoint.stackexchange
scroll top