You did all right, here is were to add the width / border / whatever css style for 
portlets :

Archana Turaga a �crit :

Let's take a look at the title for example :

> .MyNewSkinClass .PTitleLeft
> {
>  /**
>  Needs to specify the width of image used
>  otherwise it won't show !
>  **/
>  width:10px;
>
>  /** Always use relative path ! **/
>  background:  url(../images/html/skins/Metal/titleleft.gif); }

This is for top left border of portlet. If you want to increase the left border, just 
change the "width:10px;" (but also make sure that it fits with titleleft.gif !!!
(that's what I meant by "Needs to specify the width of image used  otherwise it won't 
show !")


> .MyNewSkinClass .PTitle
> {
>  /**
>  Specify the height of the image used
>  else it will use the text height
>  **/
>  height:16px;
>  color:#FFFFFF;
>  background:  url(../images/html/skins/Metal/title.gif); }


Here I set the top title bar to a width of 16px . I could also have done that in 
PTitleLeft but it is useless, as common browsers (IE / Mozilla) uses the larger one.

> .MyNewSkinClass .PTitleRight
> {
>  /**
>  Needs to specify the width of image used
>  otherwise it won't show !
>  **/
>  width:10px;
>  background:  url(../images/html/skins/Metal/titleright.gif); }

Same trick for right border.

... same for the rest in fact :)

> * THEN i modified default.css to include myskins.css....

Exactly what you should have done.

> Do you see anything else i need to do?

No (new skins ? :))

> If i want to add the border width and color where can i add it in the
> above css file? Thanks for your help,

Well, if you want to have the same border color for all the portlet then you'll need :
- to get rid of the images (or check that tehy match the background color)
- to add a color property to all the classes used by portlet border : 
PTitle(+Left/Right), PContent(Right/Left), and PBottom(+Left/right)

The great thing (hmmm... "I" find it great, don't know about other users) is that you 
can control every border of your portlet this time.
And with the cascading property of css, you can define your default PTitle / whatever 
(without prefixing it by MySkinClass) and then override / add some properties in a new 
skin.
Of course you'll need a little training with css overriding stuff, but it is mostly 
like in extends in Java !

Hope I was clear,
Aurelien

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to