Customizing the SAP Portal theme
Advanced portal theme customization by using the web dispatcher URL rewrite functionality. This will redirect the portal to a new CSS file that is stored within KM.
This is quite a hack but can be a successful way to make detailed changes.
Read the source article at SAP Network Blog