0

I have a sharepoint 2013 blog, in that i have a CSS file in assets and i reference the masterpage to it. This works fine, i can alter the layout when i want changes that should affect all views/pages.

But now i have made changes i only want for the list of posts, i do not want these changes when displaying the post by it self.

How can i target the CSS classes for a specific view?

2

if you want to do it all in the same css you'll have to inspect the html

if you do, one thing you'll notice is that both the list and the blog post have a div with a particular id before the ul#ms-blog-postList.

The id from the list is different from the post page so you can use that to specify css.

e.g.

#\{49175D8C-7623-44C1-9C8E-AD300BC2A0B1\}-\{6C22ADE7-8181-460D-8978-6A40ED0BA662\} > ul > li
{
color:red;
}

you can also search for a better different class or use other methods such as adding a class wrapper, resetting the styles in posts.aspx, using a CEWP, etc.

  • Thank you! Just what i needed, it did the job perfectly! And more importantly, i learned a lot. – Allan Pedersen Oct 1 '14 at 6:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.