This might be a bit basic but I thought I would give a step by step guide on how to customise a SharePoint list form. The first step is you need a web control.
In your Visual Studio project you need a TEMPLATES folder and a CONTROLTEMPLATES folder beneath it. This is where you add your user control. Lets not worry too much about the code on the user control just yet.
Next we want to make the web control available when the SharePoint list form loads.
To do this add the line
<%@ Register TagPrefic="xyz" TagName="MyWebControl" src="~/_controltemplates/WebControl.ascx" %>
into the web page.
Now there are two ways to do this depending on what you want to achieve.
Firstly you can add the line into the master page so that is available to every page on the site.
Secondly you can add it to the custom page associated to the list.
Your code behind can then determine when to make the panel visible or hidden which will determine if the styles are applied to the page or not.