www.dianthavanmarion.nl

Branding SharePoint

By Diantha van Marion

February 12th, 2009

Reset the styling of the rollover of the items:

.ms-topNavFlyOutsHover,
.ms-topNavFlyOutsHover a{
    background-color:red;
}

Reset the styling of background of the item arrow:

.ms-topNavFlyOuts td{   

    background-color:white;
}

Reset the styling of the background of the items:

.ms-topNavFlyOuts{
    background-color:white;
}
To reset the arrow of the menuitems with a second niveau of items, see heathers blog:
http://heathersolomon.com/blog/archive/2009/02/09/Modifying-the-second-level-navigation-arrow-image.aspx

So, all together:

.ms-topNavFlyOutsHover,
.ms-topNavFlyOutsHover a{
    background-color:red;
}

.ms-topNavFlyOutsHover a:link,
.ms-topNavFlyOutsHover a:visited,
.ms-topNavFlyOutsHover a:hover{
    color:white !important;
}

.ms-topNavFlyOuts a:link,
.ms-topNavFlyOuts a:visited{
    color:red;
}

.ms-topNavFlyOuts td,
.ms-topNavFlyOuts{
    background-color:white;
}

The border that comes around the whole flyout area still has a blue border. This is
set on the classname of the .zz1_TopNavigationMenu. Every flyout menu has it’s own
classname, but in that classname is a ID-number. You will never know which numbers
will be used, since you do not know how many menu items there are. For example:

.zz1_TopNavigationMenu_8 {Default.aspx (line 28)
    background-color:#F2F3F4;
    border:1px solid #A7B4CE;
}

But when you look closer, you see that beside this classname, every flyout area has
the same classname, that is zz1_TopNavigationMenu_0. So, styling the border of the
flyout menu, will be done by changing the border of this classname. Like this:

div.zz1_TopNavigationMenu_0{
    border:1px red solid;
}

Do check the flyout menu on a listpage, and double check if the list header is not
visible on top the the flyout menu. if so, check
this blog post
.

That’s all folks!

January 30th, 2009

What are the possibilities of snippets? Can you export them? Can you put them in a repository? The meaning of making snippets is to easy reuse some code, but you want others to be able to use your snippets to, right?

Snippets are stored in a particular folder. Snippets can be copied from this folder
and shared as you can share any other file. Snippets from other sources can be copied
to that folder.

More info on http://msdn.microsoft.com/en-us/library/xhc38ksb(VS.80).aspx.

If the snippet is changed, every developer needs to get an update of that. And that
isn’t as easy as pressing get latest. No, the one editor needs to make a new export
and distribute it to the developers. A conclusion is that snippets aren’t mend to
be changed after spreading them. I can imagine, but on the other hand, I can imagine
that you would like to. A walk around for this could be to put the snippets in vault.
They can be edited in there and if a developer needs a particular snippet, he can
get the latest version. The working folder of vault should be the folder the Code
Snippet Manager is pointing to.

Can snippets be changed after creating them? Code snippets can be edited after creating
them. Press ctrl and enter to open the snippets list in SharePoint Designer. Choose
customize list. In this list you can select one of the snippets and choose modify.
That easy.  Are you interested in the default Code Snippets (c#),

take a look here: http://msdn.microsoft.com/en-us/library/z41h7fat(VS.80).aspx

and find a list of the names of the default snippets and what they do.

There’s a Code Snippets Manager, in where you can manage the directory snippets are
stored in. You can also import snippets to that directory. More information on the
Code Snippet Manager:

http://msdn.microsoft.com/en-us/library/9ybhaktf(VS.80).aspx

and http://msdn.microsoft.com/en-us/library/wy5tazc9(VS.80).aspx.

Here’s more information on the security considerations of snippets: http://msdn.microsoft.com/en-us/library/7839bk64(VS.80).aspx.

Here’s another reference schema, for xml code snippets: http://msdn.microsoft.com/en-us/library/ms171418.aspx.

To use snippets in visual studio you need an add-in, so you can create a code snippet
using right mouse clicking.

More info on the export as code snippet add-in for Visual Studio 2008: http://www.codeplex.com/ExportAsCodeSnippet/Release/ProjectReleases.aspx?ReleaseId=11816

and how it works:

http://www.codeplex.com/ExportAsCodeSnippet.

January 29th, 2009

I tried to style the page layouts using the same HTML, and different styling, but had some trouble doing so. Therefore I created another piece of HTML for sketch B. I started my sketches and HTML with four-column-pages, and when the HTML and CSS looked fine I removed some of the columns. The page was build this way, so that removing one of the columns, the page will still look like it was supposed, even when there is more content in the columns.

So I tested the behavior of the columns by adding some lines of text into one of the
containers or columns. Previewing this in different browsers allows you to see what
will happen to the other containers and columns, when there is more content that somewhere
else. Does it wrap the line? Does it wrap it like a block, or does it shows the text
underneath the other columns?

    <div id=”Sketch_B”>

        Sketch B4

        <div id=”topcontainer”>header</div>

        <div id=”centercontainer”>

            <div class=”left
column”>B1</div>

            <div id=”centerrightcontainer”>

               
<div class=”secondleft column”>B2</div>

               
<div class=”secondright column”>B3</div>

               
<div class=”right column”>B4</div>

               
<div id=”bottomcontainer”>footer</div>

            </div>

            <div class=”clearboth”></div>

        </div>

    </div>

I removed some of the sketches I made, because I found them not as default as I thought
when making them. Basically, I came up with only two sketches, I posted before, that
should cover most of the page layouts. Of course the number of columns in these sketches
can vary; I still think that it’s the same sketch if they do. So much for the HTML
and CSS snippets for page layouts. I think this is a good foundation for expanding
the idea. Making more sketches of page layouts, and let them work as snippets.

January 28th, 2009

Ok, now you know how to make snippets from HTML and CSS. Next thing is making the HTML. And CSS. But before you can start with that you have to know what kind of page layouts are needed. I think it is nice to have some body else think with you on this  thing. When you know what page layouts are to be made, you can think of what the ideal HTML and CSS is, to make it like that. It has to be logical, valid and compatible with MOSS, because these page layouts are to be used for making MOSS sites, or custom portals of  SharePoint.

So a couple of the layouts will be like with a header, a one, two, three or four columns
container and a footer. But of course the footer could also be underneath one or more
of the columns, instead of at the bottom of it all. Another point is the width of
the columns. Is it fixed? Or is  it liquid? And what are the names of the containers?
Do they have class names or ID names? So, there are a lot of things to be  considered.

It is really hard to give a snippet a logical name. It is just a few words, that will
need to tell how this HTML will render a page layout. You need a guide for it. In
that guide there will be all the varieties of page layouts and there name with it.
This way, you can store as many snippets as you like, cause users can look up the
name of the snippets they would like to use.

First of all make some sketches and feel free to work out the first one in HTML. As
I was doing it, I saw that I proberbly could make some HTML that will fit on multiple
sketches, and as the stylesheet is different, the page will get an other layout. Here
is what it looks like:

<div
id=”Sketch_A”>

    <div id=”topcontainer”>header</div>

    <div id=”centercontainer”>

        <div class=”left column”>left</div>

        <div class=”secondleft column”>second
left</div>

        <div class=”secondright column”>second
right</div>

        <div class=”right column”>right</div>

        <div class=”clearboth”></div>

    </div>

    <div id=”bottomcontainer”>footer</div>

</div>
The div#sketch_A determines what CSS belongs to this layout. Of course the .columns will float, in this case to the left. I could give them a classname=”left” and give it a float:left in the stylesheet. But if I do so, it will not be possible to float that one different in an other layout. So it’s better to give the whole container an ID and style the elements that are in that particular ID. So, now let’s try styling the second sketch, using the same HTML (except for the #sketch_A, that one will become #Sketch_B.)

January 26th, 2009

IntelliSense Code Snippets are reusable, task-oriented blocks of code. They provide a way for you to insert ready-made snippets of code into your projects.

It’s really easy to create a snippet in SharePoint Designer. Just select the HTML
you would like to create a snippet from and press the right button, select create
code snippet. Here’s a video on how to do it. It is really easy to create reusable
HTML, but as I was thinking, it is only the HTML. When you use the snippets to create
a certain layout, you also will need the CSS that makes the layout look like it should.
So teh next step is to create some HTML which you will make a snippet from. Then,
create some styling, which will work with the HTML and see if that can also become
a snippet. If this works, a layout can be chosen by selecting the snippet of the HTML
and the snippet of the CSS. Let’s find out..

So I created some HTML and made it a snippet. And I created some CSS to go with the
HTML and also made it a snippet. Works the same. Ok, now I’ve got a new HTML file,
and want to add the first snippet I just created. How do you do that? Mm..

Then I suddenly remembered. Pres ctrl and enter, and then there comes a popup with
all the snippets available. Including the ones I just made. Now I could add my snippets
HTML and CSS. Works just fine. But, of course I would like the CSS to be pasted in
a extern file, the stylesheet. So I created a stylesheet and saved it as .CSS file.

Actually, I opened an exiting stylesheet and try to add the snippet in there. Works!
Great. So what I can do now is create some snippets with HTML and create some snippets
with CSS and give them almost similar names, so that you can easily find the snippets
that belong to each other.

I was hoping that it was possible to make a new folder for the snippets I am about
to make, but that seems not possible. So I have to think about what keywords I will
use for the snippets. They have to be recognizable for their function and they have
to fit to another snippet, cause a HTML snippets has a matching CSS snippets.

Okay, so much for that. Let’s focus on making the HTML and CSS now.

More info on snippets:
Visual Studio 2005 Code Snippets
Visual Studio 2005 includes code snippets covering tasks ranging. A set of Visual
Basic and Visual C# Code Snippets are included in the Visual Studio 2005 box.

Creating and Using IntelliSense Code Snippets IntelliSense Code Snippets provide a
way for you to insert ready-made snippets of code into your projects. This section
contains topics describing how to create, use and manage IntelliSense Code Snippets.

Code Snippets in Microsoft Office SharePoint Designer 2007

In this video you will learn how to create code snippets and use some basic functions
of the code view inside SharePoint Designer

January 23rd, 2009

So, you have some topmenu items, and some subitems in it. and one of
the sub items is some wider than the rest, because the text of it is
more characters. Have you noticed the blue background-color of on of the smallest submenu items of the flyouts menu?

The difference in length of the most wide menu item and the others that are smalle
will appear blue when hovering it.

You probably styled the a-tags of the topnavflyouts and it’s parent. You should also
style the .ms-topNavFlyOutsHover by giving it the same background-color of the rest
of the hover state of the a-tag.

Your result should look like this:

January 15th, 2009




Standard WSS blog site

The first thing to say about the CKS:EBE is that it is a feature, not a site template.
Essentially this means that you can create a standard WSS blog site and use it, later
you can add the EBE functionality if you want. This is very useful as it does not
require you to make a decision about what type of blog you are going to use when you
initially create the WSS site.

Once your site is created and you decide to use the CKS:EBE then you can easily add
the solution to the farm and activate the feature on your blog site. All the CKS:EBE
functionality will become available to you and your blog will switch to the default
CKS:EBE site template. This can be done immediately after creating the site or after
months of use. If you then decide you wish to go back to the original blog site template,
then just de-activate the feature…everything will return to normal.

I should point out here that currently the CKS:EBE leaves behind all the lists and
columns it creates when you de-activate it. This is so that you do not lose any information
by de-activating the feature. If you don’t want them anymore then you can safely delete
them.



Themes Feature

The themes feature is the one which contains all the default themes shipped with the
CKS:EBE. These can be used as they are, extended with new functionality or used as
the basis for a theme of your own. This feature is hidden and is activated by the
site feature.



Site (Web) Feature

The site feature contains all the pages, lists and new columns needed for the EBE.
Upon activation the feature receiver executes code which performs all the updates,
modifications and additions. This code also activates two other features to the web.



The Themes – Modular Theme Framework – MTF

The modular theme framework is what allows the blogs to be skinned and also allows
them to be easily switched. The MTF gives blog owners the ability to switch themes
as desired and makes creating custom themes for WSS blogs much easier.



The MTF uses of XSL and CSS to style a blog by transforming the XML produced by the
EBE. Creating a new theme involves modifying the .master page, creating some new CSS
and modifying the XSL…for the most part new themes can re-use existing XSL provided
OOTB.

Source: http://blog.thekid.me.uk/archive/2007/10/22/a-quick-introduction-into-the-cksebe.aspx

More

More info on  how to edit the masterpage, css and xls: http://www.helloitsliam.com/archive/2008/05/23/cksebe-%E2%80%93-how-to-create-a-new-skin-part-2.aspx



Summary

Go to all site content: https://portal.tamtam.nl/tammo/yourname/Blog/_layouts/viewlsts.aspx


Choose Themes, under Document Libraries

Choose the theme you would like to edit, or create one yourself. This blogpost is
telling you how:
http://www.helloitsliam.com/archive/2008/05/23/cksebe-%E2%80%93-how-to-create-a-new-skin-part-2.aspx

In this list are the images, masterpage and stylesheet to edit. Download a copy, edit
it and upload it again, to see your changes.

Make sure you have chosen the right theme on your blog to see the changes.



That’s
all folks!

January 9th, 2009

I saw this article about a Javascript library that sandwiches PNG image support into IE6 without much fuss.

All you have to do is add
img { -ms-interpolation-mode:bicubic; }

to the stylesheet.

Read all about it here.

January 7th, 2009


How to remove the rollover image of the toolbar:

 

.ms-splitbuttonhover {

                background-image:none;

}

.ms-splitbuttonhover .ms-splitbuttondropdown, .ms-splitbuttonhover
.ms-splitbuttontext {

                border:1px
transparent solid;

}

.ms-menubuttonactivehover,

.ms-buttonactivehover {

                background-image:none;

                border:1px
transparent solid;

}

 

The transparent border is needed, otherwise the button will jump on rollover. You
can also fill in the color of the background here.

December 18th, 2008

Once upon a time there was a td with id _invisibleIfEmpty.
This td seems to have a padding of 4 pixels, but no one seems to know how the padding got there.

There was no #_invisibleIfEmpty in any of the stylesheets, and there was no inline
padding defined. So how did the padding get there?

How this fairytale is going to end? Nobody knows..