Scriptmanager changes css

  1. #1

    Scriptmanager changes css

    Hello.

    When I add the ScriptManager class to the site, my predefined css changes (for example h1, h2, h3, small). I don't want to disable all the css (the controls use it, right?). Is there a way to prevent the css layout from changing?
  2. #2

    RE: Scriptmanager changes css

    You can add ScriptContainer in page header before you css styles
  3. #3

    RE: Scriptmanager changes css

    Hi kabla,

    The stylesheet added by the Coolite/ExtJS controls does override many default css classes. This can certainly cause problems when adding the controls to an existing project. This is something we've discussed with the core ExtJS development team and with some luck will be addressed in a future ExtJS release (v3.0?).

    There are a couple ways to attempt to work-around the problem...

    1. As mentioned by Vladimir (vladimir), you can add a ScriptContainer control into the <head> of your Page at the position where you want the Coolite/ExtJS scripts and styles to be injected. If your styles are being overwritten, adding the ScriptContainer before your .css include *should* solve most of the conflicts.

      Example

      <head runat="server">
          <title>ScriptContainer</title>
          
          <cool:ScriptContainer ID="ScriptContainer1" runat="server" />
          
          <!-- Add your .css here -->
          
          <script type="text/javascript">
              // your javascript here
          </script>
      </head>
      <body>
          <form id="form1" runat="server">
              <cool:ScriptManager ID="ScriptManager1" runat="server" />
    2. Set the RenderStyles property to "None", and then manually add a link to the ext-all.css file as required. The following forum posts outline how/where to set the RenderStyles property.<ul>
    3. http://forums.ext.net/showthread.php?postid=177.aspx
    4. http://forums.ext.net/showthread.php?postid=178.aspx
    5. http://forums.ext.net/showthread.php?postid=11.aspx
    Example

    <cool:ScriptManager RenderStyles="None" ID="ScriptManager1" runat="server" />
    [/list]All that said, there still might be some css collisions.

    Hope this helps.

    Geoffrey McGill
    Founder

Similar Threads

  1. Scriptmanager Theme
    By joao.msdn in forum 1.x Help
    Replies: 0
    Last Post: Apr 27, 2010, 8:56 AM
  2. ScriptManager.AddScript()
    By tonymayoral in forum 1.x Help
    Replies: 0
    Last Post: Feb 04, 2010, 4:28 PM
  3. Problem with ScriptManager
    By hansweber2 in forum 1.x Help
    Replies: 3
    Last Post: Jun 23, 2009, 9:24 AM
  4. ScriptManager in 2.0 app Causes CSS to fail
    By Tbaseflug in forum Bugs
    Replies: 0
    Last Post: Apr 22, 2009, 1:52 PM
  5. ext:ScriptManager use???
    By pearl in forum 1.x Help
    Replies: 2
    Last Post: Mar 03, 2009, 8:03 AM

Posting Permissions