Category Archives: HTML/CSS

Ribbon visibility using CSS

This is the fourth post in a SharePoint 2010 ribbon series.  Be sure to check out posts 1through 3 as well:
1) Boil it down to the basics… the SharePoint 2010 ribbon
2) Gathering requirements for your ribbon needs
3) The Docked Ribbon

The ribbon doesn’t have to be big and scary.  SharePoint ribbon customization can be completed with just a little CSS and tweaks to your master page. In this post we are going to focus hiding the ribbon when it is not in use. Continue reading Ribbon visibility using CSS

CSS Challenge Response: Change dialog box background

A CSS Challenge from Jennifer:

I have a masterpage with a black background and white links…however when I edit a page and insert an item the popup box is white background with white links. I would like to change the background of the box but my designer tool won’t pull the information so I can see what style is controlling it.

The dialog box can be tricky. What is happening is your HTML is getting loaded up in an iFrame so you essentially have your master page within your master page. The HTML, FORM, BODY (etc.) tags are all repeated again.  The trick to controlling the dialog box is to reference the class (.ms-dialog) that is assigned to the HTML element that is within the iFrame.

Here is the CSS to control the background of your dialog box. Continue reading CSS Challenge Response: Change dialog box background

CSS Challenge Response: Simple styles for SharePoint list

A CSS Challenge from Fred:

Make lists look like basic MS-Office tables:

  • dark background header row with white text
  • alternate rows with light color background
  • dark bottom borders on every rows

Here is the CSS to start your list/library styles! Continue reading CSS Challenge Response: Simple styles for SharePoint list

Add a tool tip for an image you create in CSS

My golden site design coding rule is site design supporting images are only referenced through the CSS.  This would include logos, header images, gradation bars, decorative backgrounds, etc.  Content supporting images (like Bob and Joe hanging at the company picnic) are content supporting images and therefore can end up in other places outside of CSS.

A question that often comes up when I teach this is “what about the ALT text value for the image?”. Continue reading Add a tool tip for an image you create in CSS

Create a dynamic, linked logo that goes to your root site

In just about every SharePoint site I customize and every CSS demo I do for people, I always use CSS to convert the SharePoint site title to a clickable logo, much like how we see all across the web.  Having your company logo in the upper left corner of your web site that when clicked takes you back to the home page is a very established usability pattern. People just expect it! Continue reading Create a dynamic, linked logo that goes to your root site

Creating a centered fixed width design in SharePoint 2010

Switching your SharePoint site from a fluid width (how it is setup out-of-the-box with v4.master or nightandday.master) is a simple task. It requires one change to the master page and the addition of one style statement. Where things get tricky is how to go from there in regards to handling the scroll bar SharePoint automatically generates under the docked ribbon. But let’s get the easy part done first. Continue reading Creating a centered fixed width design in SharePoint 2010