Updated: 1/09/2005; 21:05:40.
Hannes 'Shorty' Decorte's Radio Weblog
Learning .Net and the Experiences doing so


zaterdag 20 augustus 2005

If you want to change the colors and layout for the searchbox you can modify the default.aspx of the site definition.
Keep in mind that changing the default.aspx of a site definition will affect all sites based on that definition.

Before changing the default.aspx I would strongly recommend that you take a backup of the file, or better yet create you own custom site definition.
See
this presentation of Patrick Tisseghem delivered at Teched 2005 for creating custom site definitions.

Other MSDN content on helpfull in creating site definitions can be found here and here.

Now back to default.aspx.

The layout and colors of the searchbox are specified in the OWS.CSS file located in the %Program Files%Common FilesMicrosoft Sharedweb server extensions60TEMPLATELAYOUTS1033STYLES folder.

Classes affecting the searchbox are:

.ms-searchbox
.ms-searchform
.ms-searchcorner              

Since changing the css file affects all SharePoint sites, I didn't do just that.

Instead locate the following line of code in the default.aspx file:

<Link REL="stylesheet" Type="text/css" HREF="/_layouts/1033/styles/ows.css">

Anywhre in the HEAD section below that line put the following code:

<style>
.ms-searchbox {
    background-color: #FFFFF;
 font-family: verdana;
 font-size: 8pt;
}
.ms-searchform {
 background-color: #DDDDDD;
 font-family: verdana;
 font-size: 8pt;
}
.ms-searchcorner {          
    background-color: #DDDDDD;
    background-image: url("");
    background-repeat: no-repeat;      
    background-position: left top;
}
</style>


This will overwrite the OWS.CSS file.

Refresh the SharePoint site and see the changes.


10:02:23 AM    comment []

© Copyright 2005 Hannes 'Shorty' Decorte.
 
August 2005
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Jul   Sep


RSS Feed


Other .Net Bloggers

Bart De Smet
Jan Tielens
Patrick Verbruggen
Patrick Tisseghem
Tom van de Kerkhof's Bloggings
Tom's Corner
Yves Hanoulle

Aggregated Feeds

Belgian .NET Bloggers