Override Styles for Individual Webparts on Individual Portal areas

Override Styles for Individual Webparts on Individual Portal areas

Post by anonymou » Wed, 24 Dec 2003 04:10:50


I am customizing a SHarepoint 2003 portal for a customer.
They want to change the background and border on
individual web parts on portal areas.

I've figured out how to modify the display of web parts
by modifying the stylesheets for example changing the
style ms-WPTitle and setting the color to red thus:

.ms-WPTitle
{
font-weight: bold;
font-family: verdana, arial, helvetica, sans-serif;
color: red;
padding-left: 6px;
padding-right: 7px;
padding-top: 2px;
padding-bottom: 2px;
font-size: 8pt;
}

Changes the title text in SOME webparts to red.

I really want to be able to override the property for
individual webparts on just one portal area. Is there
some way to achieve this. For example is it possible to
modify the property sheet for the base webparts to add a
prorerty for background colour or border width so that
you can specify the value by editing the webpart
properties on the portal.

If anyone could give me some clues as to how to set about
this I would be most grateful.
 
 
 

Override Styles for Individual Webparts on Individual Portal areas

Post by Bil Simse » Wed, 24 Dec 2003 20:39:59


The only way I can think of to override it for individual web parts is to:
1. Create a new stylesheet and specify it in the site description page in
site administration
2. Put new custom styles in it (like my-WPTitle)
3. Edit the page/wp with FP2003 and tell it to use your style rather than
the default one (ms-WPTitle)

-Bil

 
 
 

Override Styles for Individual Webparts on Individual Portal areas

Post by anonymou » Wed, 24 Dec 2003 23:30:43

But the effect of that would be to override the style for
all of the parts on the page. What I want to do is to put
a grey background on the links web part and perhaps a
border but leave the news web part with a white
(transparent) background. The effect the customer is
after is to draw attention to one webpart by changing its
visual characteristics while leaving the other webparts
untouched.

Unless its possible to override the style part of the way
down the page ? (and then overide it back again after the
webpart I want modified) ?

John
 
 
 

Override Styles for Individual Webparts on Individual Portal areas

Post by Bil Simse » Thu, 25 Dec 2003 11:04:07


Then create a new style to use, override that style in that web part (you'll
need to convert the webpart to XSLT using FP2003 for this) and change the
style there.

-Bil
 
 
 

Override Styles for Individual Webparts on Individual Portal areas

Post by anonymou » Thu, 08 Jan 2004 04:23:00

Thank you Bill.

I'm no Frontpage guru and I lack a suitable how to book
to guide me... but your note gave me the hint I needed on
where to look. I've gotten the effect I needed.

Many thanks again.
JOhn
 
 
 

Override Styles for Individual Webparts on Individual Portal areas

Post by SmVmZiBNYX » Sat, 21 Feb 2004 06:11:07

Can you share what your solution was I am trying to do the same thing

Thank



Thank you Bill

I'm no Frontpage guru and I lack a suitable how to book
to guide me... but your note gave me the hint I needed on
where to look. I've gotten the effect I needed

Many thanks again
JOh