CSS Works Locally then Breaks On Upload to Server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DavidPhillips
    New Member
    • May 2015
    • 4

    CSS Works Locally then Breaks On Upload to Server

    I am running into an issue where css works locally but not when I upload it to a tomcat server the css does not take effect. The code I have is simple.
  • DavidPhillips
    New Member
    • May 2015
    • 4

    #2
    Code:
    <head>
         <script src="jquery-2.1.4.js"></script>
         <script src="jquery.multiple.select.js"></script>
         <link href=”multiple-select.css” rel="stylesheet"/>
    </head>
    <body>
        <select multiple="multiple">
            <option value="1">January</option>
            ...
            <option value="12">December</option>
        </select>
    
        <script>
            $("select").multipleSelect({
                placeholder: "Here is the placeholder"
            });
        </script>
    </body>
    For troubleshooting I tried misspelling my css file locally and got the exact same result on the server. I have all of the files in the same folder.

    Comment

    • DavidPhillips
      New Member
      • May 2015
      • 4

      #3
      Code is from http://wenzhixin.net.cn/p/multiple-select/docs/

      Comment

      • DavidPhillips
        New Member
        • May 2015
        • 4

        #4
        Posting simpler code

        Code:
        <html>
        <head>
        <title>Hello World</title>
        <link rel=stylesheet type="text/css" href="Helloworld.css">
        </head>
        <body>
        <h1>testing CSS</h1>
        </body>
        </html>
        Code:
        body {background-color:lightgray}
        h1   {color:blue}
        p    {color:green}

        Comment

        • computerfox
          Contributor
          • Mar 2010
          • 276

          #5
          You are linking the stylesheet. Are you also uploading the .css file?

          Also, it's proper css practice to put semi-colons after each css value:

          Code:
          body {
           background-color:lighgray;
           }
          h1{
           color:blue;
          }
          p{
           color:green;
          }
          Try:
          Code:
          <link href="Helloworld.css" rel="stylesheet" type="text/css"/>
          Also, can you try putting the styles before the JQuery import.

          Hope that helps.
          Last edited by computerfox; May 21 '15, 02:43 AM. Reason: More details.

          Comment

          Working...