Wednesday, October 6, 2010

Create a Custom NewForm.aspx for a SharePoint List

SharePoint has a number of features when it comes to working with its built-in lists. One of these is that it automatically generates New (NewForm.aspx), Edit (EditForm.aspx) and Display (DispForm.aspx) for each list when it is created. While this is very useful, it is somewhat limited when you want to customize what is displayed, or how information is displayed on these pages.

The answer to this problem is SharePoint Designer. In the following scenario, I will show you how to customize the NewForm.aspx page for a SharePoint List using SharePoint Designer.

Your company wants to set up a Computer Equipment Request List to handle new requests that the employees have for the IT Department. So, you go and create the list in SharePoint. All is great until you realize that the majority of the information in the list is for internal IT use, and should not be presented to the end-user to fill out.

All you really want the end-user to complete is the fields, Request Name, Description, and Requested Equipment.

This is where SharePoint Designer comes to the rescue. By completing these steps, you will be customizing your own NewForm.aspx in no time.

  1. Open SharePoint Designer.
  2. Open the Site where your list resides.
  3. In the Folder List window select the Computer Equipment Request list.
  4. Right-click on the NewForm.aspx and select New From Existing Page. This creates a new page based on the original NewForm page. It is a bad idea to modify the default NewForm page, for if you need to revert back to the original, which could prove to be a difficult task. In some cases, this may require re-creating the list.

  5. Now, in the main editor window, select the List placeholder and click on the (arrow) that appears in the upper-right corner. This will bring up the Common Content Tasks List, and then select Default to Master's Content.

    Click Yes on the message box that appears.

  6. Then, you will want to select the PlaceHolderMain(Master) Content Place Holder, click on the that appears in the upper-right corner and select Create Custom Content.

  7. Next, click inside the PlaceHolderMain(Custom) and make sure that you can see the cursor inside the selected area.
  8. After this, in the SharePoint Designer File Menu, select Insert -> SharePoint Controls -> Custom List Form.

  9. In the pop-up box that appears, select the Computer Equipment Request list, and make sure that Item is selected for "Content type to use for form". You'll also want to make sure that New item form is the selected option. As for the Show standard toolbar checkbox, this depends on how you will be using your custom List Form, but for this example, uncheck this checkbox.

  10. After this, in the main edit window, you will now see a custom list form control that can be customized as needed.
  11. For our custom New Form, we need to remove the extra fields that we do not want the end-users to fill out (or see). To do this, select somewhere in the field row that you want to remove (in this case, the Status field). Then right-click and select Delete -> Delete Rows. This will then remove that field row from the custom list form control. Repeat this step for all the fields you want to remove.

  12. Once we have removed all fields we don't want to be displayed, we are left with Request Name, Description, and Requested Equipment.

  13. Now that we have our custom NewForm looking how we want it to, we need to save it in SharePoint so that we can use it. To do this, click on the Save button, and then navigate to the Computer Equipment Request list and look for the original NewForm.aspx page. For this example, we are naming the page SubmitForm.aspx.

  14. Finally, we will want to set our custom NewForm (SubmitForm.aspx) as the default New item form for our list. To do this, go back to the Folder List window select the Computer Equipment Request list and right-click on it. From the menu that appears, select the Properties option.

  15. In the pop-up box, make sure that Item is selected for "Content type specific forms". Then click on the Browse button for the New item form to select our custom SubmitForm.aspx.

  16. Now your custom NewForm page is ready for use. This is how it will appear to the end-user when they create a new item for the Computer Equipment Request list.

By following the above instructions, you will be creating your own customized NewForm.aspx pages in no time using SharePoint Designer. The same techniques can also be applied to creating custom EditForm.aspx and DispForm.aspx pages.

Next time, I'll show you how to apply these concepts to creating multiple custom EditForm.aspx pages to use with different user roles.

Wednesday, August 11, 2010

Useful facts about SharePoint farms

What is a Farm?

A place where lots of animals are kept and things are grown! J In the context of SharePoint, the term 'farm' is used to describe a collection of one or more SharePoint servers and one or more SQL servers that come together to provide a set of basic SharePoint services bound together by a single Configuration Database in SQL.

Farms can range in size from having everything (all SharePoint roles and SQL server) on one machine to scaling out every individual SharePoint serve role onto dedicated sets of servers. A farm the highest administrative boundary for SharePoint and everything that happens inside SharePoint happens in a farm.

Server Services and Fault Tolerance

Within a farm, there are several services that run on one or more servers. Some of these services are mandatory and some are optional. These services provide the underpinning functionality for SharePoint. The decision around which services run on which servers will have a huge impact on your overall farm architecture and performance.

It is worth noting that some services have built-in fault tolerance and some do not. In the TechNet articles listed above, the services that have fault-tolerance are described as "Roles that can be redundant".

This table describes each service:

Service

Purpose

Fault Tolerance

Typical Server Placement

Things to note / Rules

Windows SharePoint Services Web Application (often referred to as 'Web Server' or 'WFE')

This service is responsible for serving the HTML to clients and routing requests to other services in the farm.

Yes, this service can exist on multiple servers.

Typically there are two or more servers running this service ion a farm.

If you are using multiple servers, you must also implement a Network Load Balancing solution (NLB) to balance requests across the servers.

You must also use host headers for all web applications in this scenario.

Office SharePoint Server Search in Query Mode (often referred to as 'Query Server')

This service is responsible for executing search queries against a locally stored copy of the index

Yes, this role can exist on multiple servers

This service is typically placed on each Web Application server in the farm.

Since this service requires a local copy of the index, appropriate disk space is needed to store the index.

Office SharePoint Server Search in Index Mode (often referred to as 'Index Server')

This service is responsible for indexing all of the configured content sources, creating an index and propagating it to every Query server in the farm

No, you can only have 1 Index server for each SSP in the farm. If you have multiple SSPs (not recommended – see SSP section), you can have multiple Index servers, but they have their own set of content sources.

This service is typically placed on its own dedicated server.

It is possible to run both the Index and Query roles on the same server. However, in this configuration you cannot have multiple Query servers because when Index and Query are on the same server, propagation of the Index is disabled.

Windows SharePoint Services Search

This service is basically a slimmed down version of the Office SharePoint Server Search service which combines both the Query and Index roles into a single service.

No. If you have more than one instance of this service in a farm, it will be simply do the same thing as the other servers.

This service is typically not used. If you do run this service in a MOSS farm, it is generally run on the same server as the Index server.

If you have a MOSS farm, then the only reason for using this service would be to provide full text search of Help.

Excel Calculation Services

This service is responsible for performing calculations on Excel workbooks that are stored in the content databases.

Yes, many instances of this service can exist on the same farm.

This service is typically placed on each Web Application server in the farm initially.

However, this is a fairly resource intensive role; therefore, it is typically moved to a dedicated pair of servers if the load becomes too heavy.

Although this service does support fault tolerance, it does maintain session-state information, therefore users will stay on the same Excel Calculation Services server for the duration of their session.

Document Conversions Load Balancer Service

This service balances document conversion requests from across the server farm.

No. An application server can only have a single Document Conversions Load Balancer Service enabled.

There is typically only one server running this service in a farm. This is typically placed on the Index server

For more information on the document conversion service clickhere.

Document Conversions Launcher Service

This service schedules and initiates the document conversions on a server.

Yes. Multiple launchers can exist in the same farm.

This service is typically placed on each Web Application server in the farm.

If you are using multiple launcher services, they much each have the same set of document conversion applications installed.

Windows SharePoint Services Incoming E-Mail

This service is responsible for receiving incoming emails and placing them in email enabled lists.

Yes, this service can run on multiple servers. However this does have additional configuration. See the 'Things to note' column for details.

This service is typically placed on each Web Application server in the farm.

There are lots of pre-requisite steps that must be configured before using this service. Read morehere.

Windows SharePoint Services Outgoing E-Mail

This is not technically a SharePoint service but refers to an SMTP server which SharePoint send outbound email to

n/a

n/a

n/a

Central Administration

This service enables the central administration interface that is required for farm-wide administration

No, this service can only run on one server in the farm.

UPDATE: 17 May 2009. This is an error. The CA service only runs on one server by default, however there are ways of enabling fault tolerance for this service and in actual fact you SHOULD enable fault tolerance for this service. Spence Harbar has a great article which talks all about it:http://www.harbar.net/articles/spca.aspx .The topic is also discussed on the 'From the field' blog from our PFE colleagues:http://sharepoint.microsoft.com/blogs/fromthefield/Lists/Posts/Post.aspx?List=0ce77946%2D1e45%2D4b43%2D8c74%2D21963e64d4e1&ID=60

Typically, this role is placed on either the Index server or one of the web servers. By default, the first server in the farm will run this service.

The Central Administration web application does run on every Web Application server in the farm; however requests are always routed to the server that is running this service.

So what is the difference between an 'Application Server' and a 'WFE Server'?

When SharePoint is installed, you have to select one of three installation options, they are:

  • Application Server
  • Complete
  • Web Front End

There is a lot of confusion around what these options mean. An 'Application Server' is a server that is capable of running any of the services in the table above apart from the Windows SharePoint Services Web Application service. A 'Web Front End' (sometimes called a WFE) is the opposite in that it can only run the Windows SharePoint Services Web Application service. 'Complete' means that the server can run any SharePoint service.

The reason behind these options is that in some scenarios, very 'thin' web servers may be required which have a very small installation footprint. In this case, it is not desirable to install all of the DLLs etc that are required to run any service apart from the Windows SharePoint Services Web Application – these are true web servers. In my experience, this is a relatively rare scenario and only really relevant when SharePoint is being used to host high traffic internet sites.

The problem with selecting anything other than 'Complete' is that it means if you ever change your mind about what services a server can run, you'll need to re-install SharePoint on that server. For that reason alone, I would always recommend that you choose 'Complete' unless you have a very good reason to do otherwise.

This means that the terms 'Web Front End Server' and 'Application Server' are often used incorrectly. Unless your server is only running the Windows SharePoint Services Web Application service, it is an Application server. This means that the majority of servers in the majority of farms are actually Application servers.

How should I design my web applications within my farm?

I often get asked how to dedicate specific servers to specific web applications and the default answer is '"you can't"! J

One of the rules about SharePoint farms is that every server that is running the Windows SharePoint Services Web Application service has to serve every web application in the farm. It is not possible to say "Server X serves Web Application X". This means that when you create a new web application in Central Administration, the Windows SharePoint Services Timer on each server that is running the Windows SharePoint Services Web Application service creates the necessary sites and application pools in IIS to serve the web application.

What about Central Administration? .....

The Central Administration web application is no exception to this rule in that the web application does exist on every web server. However, the Central Administration service only runs on a single server and it is that server that responds to Central Administration requests. This is why the Central Administration site is always bound to a server name rather than an NLB-enabled host header.

Cross geography farms

One of the key questions is around how farms relate to different geographical data centres.

The quick answer is that you cannot run servers in the same farm across a WAN connection. For example you cannot have 1 web server in London and 1 in Reading if they are both in the same farm. This model will technically work, however it is unsupported because the web servers are very 'chatty' with the SQL server, therefore WAN connection are not seen as being good enough to support this.

What happens if I have a super-fast WAN? ....

There are some circumstances where you can span a farm over a WAN and they are as follows:

  • WFE has less than 1 millisecond(ms) latency to DB
  • WFE has less than 10 miles (16 kilometres) to DB
  • All servers on the same network segment
  • Same VLAN
  • No router switching
  • SSPs in the same datacenter
  • Servers cannot cross time zones

As a general rule of thumb you should plan to have a different farm at each data centre.

A farm's relationship with the SSP

One of the optional components in a farm is a Shared Service Provider (SSP). SSPs are optional applications that use a combination of web applications and server services to provide several shared services. The key thing to note here is that the SSP does not run on any single server within the farm, there is no such thing as an 'SSP server'. The SSP is actually an application that requires the following:

  • At least one server running Office SharePoint Server Search service in Index mode
  • An 'SSP Administration' Web Application.
  • 2 databases in the farm's SQL server.
  • Optionally, a server running the Excel Calculation Service.

Once an SSP is configured, its shared services can be provided to all of the web applications within the local farm. An SSP can also provide services to separate farms; this is called 'cross-farm Shared Services' and is very common in large deployments. You can read more about this in my MOSS Architecture and Shared Services article.

How many SSPs should I have in my farm? ....

Generally speaking it is best practice to have only one SSP per farm. It is possible to have multiple SSPs, but that configuration introduces a whole load of issues.

Each Web Application in your farm must get its Shared Services from a single SSP; it is not possible to pick and choose certain SSPs for certain shared services. Neither is it possible to say that a certain SSPs only provides certain services. The problem with this is that if you do have 2 SSPs, then you have 2 My Sites per user, 2 profiles per user, 2 sets of search indexes etc. Companies that do have this configuration, generally have to do a load of development work to keep the SSPs in sync with each other and make sure that user's are redirected to the correct SSP for their My Site.

There are only two common reasons for having multiple SSPs, they are:

  • Index Server scale. There is a recommended maximum of 50 million items per Index Server (more information click here). Since you can only have 1 Index server per SSP. If you can more than 50 million items to index, you may need to split the load across multiple SSPs.
  • Privacy. Some parts of the organization may actually want to host their own My Sites, Profiles etc and the split is seen as a good thing.

When to have multiple farms

The final thing that I get asked a lot in relation to farms is when to make the decision to have multiple farms. The general answer is that wherever possible, you should have a single farm.

However, there are several scenarios where multiple farms make sense. I covered some of this in my MOSS Architecture and Shared Services article, but here is a summary:

  • Physically separate data centres
  • Differing customisation approaches and polices
  • Differing support policies and SLAs
  • Development, staging and test environments

Some SharePoint facts

• SharePoint is the fastest-growing product in the history of Microsoft.

• Over 75 million licenses of SharePoint have been sold worldwide.

• SharePoint is listed, by Forrester, as the number 1 portal product.

• SharePoint is positioned as a leader within the Gartner Magic Quadrant for Horizontal Portals products.

• Over 400 case studies have been published on SharePoint.

Basic SharePoint Facts

SharePoint is a set of products and technologies with informative and collaborative web-based capabilities that help people create, organize, distribute, and maintain stored knowledge. SharePoint web sites and pages are commonly used to build intranet and extranet portals and team sites as well as public-facing Internet sites.

For this lab we build our own SharePoint Feature with dynamic capabilities. A SharePoint Feature is a collection of SharePoint elements that can help a user accomplish a particular goal or task. The uses of Features are quite broad. With our dynamic feature we will add a new Document Library to a SharePoint site and also will we provision a new custom Content Type. A Document Library is a SharePoint list in which documents together with metadata can be maintained. A Content Type describes this metadata, but is not necessarily linked to a particular list or Document Library. In fact, a Content Type can be shared among different lists and a list can contain information stored in many Content Types.

Thursday, August 5, 2010

Creating a Site Collection in SharePoint Central Administration in 2010

In this exercise you will create a new SharePoint site collection using the SharePoint 2010 Central Administration site.

1. Make sure you are logged in as the local administrator.

2. Navigate to the SharePoint 2010 Central Administration site. You can do this using the shortcut inside the Administrative Tools menu of the Windows Start menu. On this VM you can also get to the SharePoint 2010 Central Administration site by opening the browser and navigating to the following URL:

http://YourServerNameHere:2010/default.aspx


3. Explore the various pages of the Central Administration site by clicking the links in the Quick Launch bar such as Application Management, System Settings and Monitoring. This should give you an idea of how the Central Administration site breaks up management tasks into different functional areas.

4. Click on the Application Management link in the Quick Launch bar to navigate to the Application Management page. Inside the Site Collections section of this page, you should see several links for creating and managing site collections. Click in the link titled View all Site Collections which takes you to a page which shows you the site collections currently existing on the Web Application at http://intranet.contoso.com. By clicking on the individual site collections on the left, you should be able to view information about each site collection on the right of the page. You should observe that the VM has a few existing site collections in this Web Application.

5. Now it is time to create a new site collection. Click on the Application Management link in the Quick Launch bar and then click on the link in the Site Collections section titled Create Site Collections. Once you have done this you should be at a page that allows you to enter information for creating a new site collection. Enter the following information so that your screen looks like the screenshot shown below and then click OK to begin the provisioning process to create a new site collection.

a. Title: Contoso Sales Site

b. Description: My first SharePoint 2010 site collection

c. Url: http://intranet.contoso.com/sites/Lab01A

d. Template: Team site (this template is in the Collaboration tab)

e. Primary Site Collection Administrator User Name: YOURDOMAIN\Administrator

f. Secondary Site Collection Administrator User Name: (leave blank)

g. Quota Template: No Quota

Create Site Collection

6. After the site collection provision process is complete, you should a page as the one shown below. Click on the provided link to navigate to new site.

Site Collection successfully created

7. When you see the newly-provisioned site collection with a Team site as its top-level site, move on to the next exercise.

Home page of the new site collection

Thursday, July 15, 2010

SharePoint 2010 Themes

As you all know SharePoint has a new theme engine for 2010. You can do cool things such as create a theme in PowerPoint, export it and then import it into SharePoint 2010, click apply and you got a custom theme. One aspect that I could not find documented is the definition of when you choose a color for a particular element what is it really changing?

If you modify the theme for a site you can use the picker to choose a OOTB or custom theme. Or you have the ability to choose your own color scheme via the following elements.

image

My approach: Make each element white to start with and then one by one add color and document the results. Just for kicks here is what it looks like when it is completely white… (not a color scheme I would recommend…) I will be using a red color: #C12345 for testing.

image

Here are the details for each one of the elements above:

Text/Background- Dark 1 (41 Classes)

image

  • Page Title Hyperlink Text
  • Hover Text
  • VB Body Text
  • Site Action Menu Text
  • Left Navigation Links Text
  • Site Setting Page Text Headers

Text/Background - Light 1 (37 Classes)

image

  • Body Background
  • Toolbar Background
  • Quick Launch Borders
  • Web Part Header Background
  • Site Action Menu Background
  • Site Action/Welcome Text Color
  • Pop-Up Window Background

Text/Background - Dark 2 (43 Classes)

image

  • Top Banner Background
  • Left Navigation Header Text
  • Recycle Bin/View All Site Content Text
  • I Like/Tags Notes Text
  • Library Column Text
  • Site Action Drop Down Border
  • Breadcrumb Current Location Text
  • List Description Text

Text/Background - Light 2 (19 Classes)

image

image

  • Browse Tab and hover Background
  • Title Container Background
  • Top Links/Header 2 Background
  • Quick Launch Background
  • Web Part Adder Background

Accent 1 (10 Classes)

image

  • Quick Launch Hover Text
  • Top Link Selected Tab

Accent 2 (4 Classes)

image

  • .ms-error
  • Rich Text Colored Heading 2 Text Styles

Accent 3 (9 Classes)

image

  • Rich Text “Caption” Style Text Color

Accent 4 (5 Classes)

image

  • Border Under Web Part Selector

Accent 5 (3 Classes)

image

  • Rich Text Colored Heading 4 Text Styles

Accent 6 (3 Classes)

image

  • Rich Text Highlight background color

Hyperlink (12 Classes)

image

  • Toolbar Text Color
  • VB Body Hyperlink Text
  • a:link Class Text Color
  • Web Part Title Hyperlink Text (Not Visited)

Followed Hyperlink (2 Classes)

  • .ms-WPBody a:visited
  • a:visited

I hope this post will help you when you decide to create your own theme via the above elements. If you create your own theme you can simply view the source of the page and there will be a unique CSS style sheet reference “_themes/16/corev4-8digithex.css?ctag=#”. Just copy that url and past it to the end of your site stringhttp://yoursitename.com/ and you can download the custom file.

Style Individual Navigation Items for 2007 & 2010

Here is a simple yet effective way to stylize individual top navigation items for SharePoint 2007 & 2010 just using CSS. SharePoint 2010 will need a slight modification to the master page but the same effect can be achieved. See bottom of post for 2010 implementation.

To start off with lets review how this can be accomplished for 2007. SharePoint 2007 provides a unique ID for each note in the navigation.

  1. 1st Tab: Dedicated as your default Home or root node
    • ID: zz1_TopNavigationMenun0
  2. 2nd Tab: This is the first child node from the root
    • ID: zz1_TopNavigationMenun1
  3. 3rd Tab: This is the second child node from the root
    • ID: zz1_TopNavigationMenun2
  4. 4th Tab: This is the third child node from the root
    • ID: zz1_TopNavigationMenun3

See the pattern… It keeps going and going. Here is what it looks like from the IE DOM Explorer in IE8:

image

So you might ask well what can I do with this unique ID? Well here is a quick sample of what you can do. Its not pretty but it shows off that you can have a custom Icon, background color, font, etc. for each node in the navigation.

image

Here is the CSS and OOTB Icon references that I used to create the above design. So how does it work? Basically it combines the trigger of the unique ID and attaches it to the class of “ms-topnav a”. You will notice that I had to do a funky bit of css to fill in the background behind the arrow for news.

.ms-topnav{
border: none;
background-color: transparent;
background-image: none;
font-weight: bold;
}
#zz1_TopNavigationMenun0 .ms-topnav a{
background-image: url(/_layouts/images/newshomepage.png);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #006699;
border: 1px #006699 solid !important;
padding:18px 20px 0px 80px;
height: 54px;
color: #FFF;
}
#zz1_TopNavigationMenun1 .ms-topnav a{
background-image: url(/_layouts/images/PLICON.PNG);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #FF9933;
border: 1px #FF9933 solid !important;
padding:18px 20px 0px 80px;
height: 54px;
color: #FFF;
}
#zz1_TopNavigationMenun2 .ms-topnav a{
background-image: url(/_layouts/images/ANNOUNCE.PNG);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #336633;
border: 1px #336633 solid !important;
padding:18px 20px 0px 80px;
height: 54px;
color: #FFF;
}
#zz1_TopNavigationMenun2 .ms-topnav td{
background-color: #336633;
}
#zz1_TopNavigationMenun3 .ms-topnav a{
background-image: url(/_layouts/images/ReportCenter.png);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #990000;
border: 1px #990000 solid !important;
padding:18px 20px 0px 80px;
height: 54px;
color: #FFF;
}
#zz1_TopNavigationMenun4 .ms-topnav a{
background-image: url(/_layouts/images/SMT_LARGE.PNG);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #660066;
border: 1px #660066 solid !important;
padding:18px 20px 0px 80px;
height: 54px;
color: #FFF;
}
#zz1_TopNavigationMenun5 .ms-topnav a{
background-image: url(/_layouts/images/categories.png);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #999;
border: 1px #999 solid !important;
padding:18px 20px 0px 80px;
height: 54px;
color: #FFF;
}

So how do you do this for SharePoint 2010…

Well first you will need to modify the master page and do a search for “UseSimpleRendering="true"”. This basically tells SharePoint to render the navigation using a clean unordered list

format.

Since this is so clean, it does not have any unique ID’s attached to it like it did in SharePoint 2007.

image

So if you change it to false: UseSimpleRendering="false" you can clearly see that each node now has a unique ID:

image

So if we simply take the same approach for 2007 we can get similar results. You will notice the only difference in the ID’s from 2007 to 2010 is that they put in a “V4” after the word “Menu” and before the “n#”

  1. 2007 ID: zz1_TopNavigationMenun0
  2. 2010 ID: zz1_TopNavigationMenuV4n0

You can also remove the “ms-topnav” since it is not needed. You should end up with something like this:

image

Below is the CSS that I used to achieve the design above for SharePoint 2010. Remember you need to make that modification to the master page noted above to get this to work. Also notice that I kept the “a” reference at the end of each ID.

#s4-topheader2{
border: none;
background-color: transparent;
background-image: none;
font-weight: bold;
height: 54px;
padding-bottom: 5px;
}
#zz1_TopNavigationMenuV4n0 a{
background-image: url(/_layouts/images/newshomepage.png);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #006699;
border: 1px #006699 solid !important;
padding:18px 20px 18px 80px;
color: #FFF;
}
#zz1_TopNavigationMenuV4n1 a{
background-image: url(/_layouts/images/PLICON.PNG);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #FF9933;
border: 1px #FF9933 solid !important;
padding:18px 20px 18px 80px;
color: #FFF;
}
#zz1_TopNavigationMenuV4n2 a{
background-image: url(/_layouts/images/ANNOUNCE.PNG);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #336633;
border: 1px #336633 solid !important;
padding:18px 20px 18px 80px;
color: #FFF;
}
#zz1_TopNavigationMenuV4n3 a{
background-image: url(/_layouts/images/ReportCenter.png);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #990000;
border: 1px #990000 solid !important;
padding:18px 20px 18px 80px;
color: #FFF;
}
#zz1_TopNavigationMenuV4n4 a{
background-image: url(/_layouts/images/SMT_LARGE.PNG);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #660066;
border: 1px #660066 solid !important;
padding:18px 20px 18px 80px;
color: #FFF;
}
#zz1_TopNavigationMenuV4n5 a{
background-image: url(/_layouts/images/categories.png);
background-repeat: no-repeat;
background-position: -40px -3px;
background-color: #999;
border: 1px #999 solid !important;
padding:18px 20px 18px 80px;
color: #FFF;
}

Enjoy!

Alternative way to Change Site Logo

OOTB SharePoint allows you to change the logo of the page from the default: titlegraphic.gif image to another image by going into site settings > Title, Description, and Icon.

The following method is a way to add a new logo to your page with just CSS. If you wanted to make this more global you will need to use an alternate method to override the default CSS classes.

  • Upload your new logo to either the server or to a list on your site.
  • Add a Content Editor webpart to the page.
  • Add in the following to the source viewer.

  • In the example above I have uploaded the xyzcorp.gif logo to the images folder on the server.
  • Make sure you modify the elements above in bold green: logo name, height, and width (of logo).
  • Save the page and you should now have the new logo on the page.

Default:
image

Modified:
image

Change SharePoint Search Icon with Just CSS

I created a post awhile ago on how to change the SharePoint site logo via CSS so that you don’t have to modify the titlegraphic.gif file on the file server or change it via the UI for every site to make a global change.

I have a simple solution that changes the search GO icon from the standard image to something more custom image with just CSS.

The icon is not specified via the master page so you will not be able to change it there.



You might be tempted take the route of changing the following files on the server and replacing them with your own custom ones. But I have an alternative that works just as well and you don’t have to mess with any of these base Image files.

  1. GOSEARCH.GIF
  2. ICONGO01.GIF
  3. ICONGO02.GIF
  4. ICONGO03.GIF

Upload your custom images to a sub folder within the following directory: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\IMAGES\YourCustomFolder

Then in your custom CSS simply place the following CSS:

td.ms-sbgo{
background-color:transparent;
padding-left:3px;
padding-right:3px;
padding-bottom:0px;
padding-top:0px;
border:solid 0px #949494;
}
td.ms-sbgo a{
padding: 0px 0px 0px 0px !important;
margin: 0px 0px 0px 0px !important;
}

td.ms-sbgo a{
background-image: url(/_layouts/images/yourcustomfolder/custom_search.gif);
background-repeat: no-repeat;
background-position: top left;
}
td.ms-sbgo a img{
visibility: hidden;
height: 17px;
width: 17px;
}

You will simply just have to change the folder name, image name, and the height and width of the image to be specific to you and you should be good to go. The result should look something like this:

image