9 Replies Latest reply on Aug 14, 2011 9:25 AM by wodenonline

    CSS Style Sheet Link Recursive Error?

    shaunb1911

      I am trying to link a css style sheet to a new root file. When I try to link the css sheet I get an error - A recursive style import was found while trying to add Check Magazine.css. Please resolve this error by editing the file in an external text editor and try again.

       

      What does this mean?  I looked up recursive style everywhere and there is no explanation.  I don't know how to fix.  The answer I found on these forums mentioned an @import statement error but I dont even have any @import statemensts in my style sheet this style sheet is part of the Getting Started tutorial on this website.

       

      @charset "utf-8";

      #container{
      width: 968px;
      background: #FFFFFF;
      margin: 0 auto;
      padding-left: 10px;
      padding-right: 10px;
      overflow: hidden;
      }

      This is my code, can you help?

        • 1. Re: CSS Style Sheet Link Recursive Error?
          martcol Level 4

          I had a mooch around to see if I could find anything about your error and seems as though I got the same response as you - nothing!

           

          It's difficult to tell from your description what is going on but it might help to see a link to the page.  Or if you can, to attach your html/CSS pages to a post here.

           

          Martin

          1 person found this helpful
          • 2. Re: CSS Style Sheet Link Recursive Error?
            shaunb1911 Level 1

            Here is my code, however I got the error when I only had the #container, I added the banner main left etc later and still gives me the same recursive error when I try and link this CSS style sheet to my index.html file.

             

             

            @charset "utf-8";


            #container {
            width: 968px;
            background: #FFFFFF;
            margin: 0 auto;
            padding-left: 10px;
            padding-right: 10px;
            overflow: hidden;
            }

            #banner {
            background-image: url(images/banner.gif);
            height: 100px;
            width: 968px;
            }
            #main_image{
            background-image: url(images/main.jpg);
            height: 376px;
            width: 968px;
            }
            #left_column{
            float: left;
            width: 316px;
            }
            #column_container{
            float: left;
            width: 652px;
            }
            #right_column{
            float: right;
            width: 316px;
            }
            #center_column{
            width: 316px
            margin-left: 10px;
            }

            • 3. Re: CSS Style Sheet Link Recursive Error?
              shaunb1911 Level 1

              This is my index.html code, I am so lost as to what to do to get rid of this stupid error.  My style sheet is not linked so of course it is useless and I have to code on both documents since the code doesnt show up automatically on the Style sheet when I add something to the index page

               

              <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
              <html xmlns="http://www.w3.org/1999/xhtml">
              <head>
              <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
              <title>Check Magazine</title>
              <style type="text/css">
              <!--
              #banner {
              background-image: url(images/banner.gif);
              height: 100px;
              width: 968px;
              }
              #main_image {
              background-image: url(images/main.jpg);
              height: 376px;
              width: 968px;
              }
              #left_column {
              float: left;
              width: 316px;
              }
              #column_container {
              float: left;
              width: 652px;
              }
              #right_column {
              float: right;
              width: 316px;
              }
              #center_column {
              width: 316px;
              margin-left: 10px;
              }
              -->
              </style>
              </head>

              <body>
              <div id="container">
                <div id="banner"></div>
                <div id="main_image"></div>
                <div id="left_column">Content for  id "left_column" Goes Here</div>
                <div id="column_container">
                  <div id="right_column">Content for  id "right_column" Goes Here</div>
                  <div id="center_column">Content for  id "center_column" Goes Here</div>
                </div>
              </div>
              </body>
              </html>

              • 4. Re: CSS Style Sheet Link Recursive Error?
                martcol Level 4

                I wonder if the code that you posted is telling the whole story?

                 

                In your first post there's a reference to @import and a style sheet called Magazine.css

                 

                Not sure where that is.

                 

                Martin

                • 5. Re: CSS Style Sheet Link Recursive Error?
                  Randy Edmunds Adobe Employee

                  An example of a recursive style sheet error would be something like the following:

                   

                  1. Create style sheet called main.css

                  2. In main.css, add this rule:

                   

                  @import url(main.css);

                   

                  That causes an infinite "recursive" loop because it inserts itelf. You can have the same problem with multiple style sheets that each @import the next one, and the last one @imports the first one.

                   

                  From what you showed, I'm not seeing what is causing it. You said that you are in the process of attaching a style sheet, so could you be selecting the main document (.html) as the style sheet to attach instead of the style sheet (.css) file by mistake?

                   

                  HTH,

                  Randy

                  1 person found this helpful
                  • 6. Re: CSS Style Sheet Link Recursive Error?
                    shaunb1911 Level 1

                    To be honest I have no idea what @import is but I am pretty sure I dont have any code in either my check magazine.css stlye sheet or my index.html.  The first bit of code is my check magazine.css style sheet and the second bit of code is my index.html code.  I am so confused as to why I keep getting this error becaue I dont have any @import satements just an @charset

                    • 7. Re: CSS Style Sheet Link Recursive Error?
                      drawing3d

                      The Style Sheet Link Recursive Error you are getting is from trying to link the style sheet to the style sheet rather than to the .html file.

                       

                      Simple fix is to "de"select the .css file by clicking the .htm(l) file in the top left navigation bar, then in the CSS Selector select the attach style sheet option again.

                       

                      (The Adobe instructions were a little fuzzy causing the confusion.  It is not a code flaw.)

                       

                      Hope this helps!

                      • 8. Re: CSS Style Sheet Link Recursive Error?
                        jmedina7758

                        I had that happen to me and the way i solved it was i saved the .css fi

                        le and went over to the index page then i was

                        able to link the folder. hope that helps

                        • 9. Re: CSS Style Sheet Link Recursive Error?
                          wodenonline

                          thank you so much for that, so simple when you know how