Showing posts with label CSS. Show all posts
Showing posts with label CSS. Show all posts

Tuesday, July 17, 2012

Hide SharePoint List Header

When placing a SharePoint list on a webpage, by default it includes the column headers. Normally, this is great because you can then sort and filter the data in each column. However, in some instances it just doesn't make sense.
On my website we have a lot of FAQs and we put the questions/answers in a SharePoint list. When you place that list on the webpage, you get the column header, but since there are only two columns in the list, it's pretty obvious which is which. Furthermore, the sorting and filtering capability isn't really necessary.

THE BEFORE

The nature of this list makes the column headers look odd and out of place.

Sorting and filtering options just are necessary for a list like this.

 
By adding a Content Editor Web Part to your page and putting the following CSS in the HTML you can hide the column headers on the page.

<style>
TR.ms-viewheadertr > TH.ms-vh2 {
DISPLAY: none
}
</style>

THE AFTER
They are gone!

Wednesday, June 27, 2012

I broke the internet

Well, only sort of. Today was not my best day - I rolled out some code that took down our public website for a few hours this morning. The thing is, it only affected FireFox and Chrome (and maybe Safari - didn't check) but IE was fine so I didn't notice right away...when I did notice - I got that sick to my stomach feeling when you know you screwed up but you are not quiet sure how to fix it.
Took about 40 minutes but I was able to fix my mistake and there were several times when I had to wait for something to deploy or wait for a server to reboot. Turns out sitting and thinking about my screw-up made me feel even worse - so to take my mind of SharePoint and code I give you a list of non-SharePoint things that make me happy and do not require me to use any CSS.
  1. Come on, you know you want to: http://www.people.com/people/
  2. My Etsy Shop: http://www.etsy.com/shop/themunch
  3. How a Web Design Goes Straight to Hell: http://theoatmeal.com/comics/design_hell
  4. A great place to get lost in all the cool stuff they sell: http://www.uncommongoods.com/
  5. My favorite mommy blogger: http://www.dooce.com/