Link to home
Start Free TrialLog in
Avatar of JohnWoo
JohnWoo

asked on

Customizing Web Parts CSS in Sharepoint site

Hi,
   I am currently working on a sharepoint site where now I am trying to change the layout of the site main page. I Am using web parts to display data on the main page. The one problem I am experiencing now is the difficulty of changing the CSS of the web parts content. I have search through the microsoft web site and I have managed to retrieved a list of the standard CSS being used by the sharepoint site. Everything works fine except that I have not being able to change the style of the column header displayed. Accroding to the list available, the class being used is called "ms-vh" or anything that came close to that but it. See the folowing link:

http://www.sharepointcustomization.com/wss/articles/themes-home.htm

Therefore, I am hoping that someone could tell teh real class that the column header of the web parts is using as the current one I got from microsoft don't seems to be correct.

Actually, I am trying to hide the column header away from the web part but I have not managed to do that and  are having diffiult time with it.......If anyone could also tell me how to hide away the column header from teh web parts pls reply asap. Thanks  
Avatar of meverest
meverest
Flag of Australia image

Hi,

did you view the source and check the value of 'class' for the relevant column header?

it will be <table class='xxx'> or <tr class='xxxx'> or <td class='xxxx'> - just find whatever is the 'xxxx' in teh relevant stylesheet.

Cheers.
Avatar of JohnWoo
JohnWoo

ASKER

The Web Parts was a component provided in share point SDK. Therefore, I can't view the HTML code of it to find out the exactl CSS. Anyway..I have managed to do that already but I really want to get rid of the header column because those columns can be clicked for sorting purpose and the sort function will need to be hard coded (which I don't know how to do). So if the those header columns were clicked without the sort fuinction then the page would generate error. Therefore, I really need to know how to get rid of those colums. Thanks
Avatar of JohnWoo

ASKER

After some inspection I found that with the list view property of the web part, there's an option to enable column headers and sorting under the style property of the list view property but that option was disabled and grayed out and it was checked. Is there a way for me to enable that option back?? Beacause I have tried all sorts of possible ways but still can't get that check box enabled.  
haven't played much with web parts but can you open the page housing your webparts in Frontpage 2002+?
right-click on the web part-->view properties-->options-->Set Toolbar Type to "none"
If there are still things there you don't want to see, right-click web part-->layout customisation view-->edit to your hearts content.

I think you've found this already but .ms-vh is located in \_layouts\styles\ows.css in the current site (subwebs will have their own _layouts directories).
Avatar of JohnWoo

ASKER

Yes I manage to open it and I have been using FrontPage 2003 to perform my customization on the page but I don't seems to see/access the options and steps you mentioned in the web part right-click menu.
ASKER CERTIFIED SOLUTION
Avatar of alimu
alimu
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JohnWoo

ASKER

OIc...I think I found the way of doing it. I noticed that if I converted the the web part into XSLT, it will allow me to edit its's XML code as well as its' layering and structure. Thanks experts. Just one more question, would this page be workable if I transfer it to other sharepoint server?? I noticed this will gives error regarding to the datasource of the web part but is it possible for me to change its' datasource path in XSLT form without redesigning the web parts (eg. delete the old web part and drag and drop a new one). This is because I want this to be dynamic so that it can be used in between different sharepoint site??? Thanks again.  
honestly don't know the answer to that one, you might be able to find some info on that sort of thing on msdn:
http://msdn.microsoft.com/library/en-us/odc_SP2003_ta/html/sharepoint_creatingcustomwpptemplates.asp and associated pages...