473,378 Members | 1,447 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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.
May 19 '15 #1
4 3503
Expand|Select|Wrap|Line Numbers
  1. <head>
  2.      <script src="jquery-2.1.4.js"></script>
  3.      <script src="jquery.multiple.select.js"></script>
  4.      <link href=”multiple-select.css” rel="stylesheet"/>
  5. </head>
  6. <body>
  7.     <select multiple="multiple">
  8.         <option value="1">January</option>
  9.         ...
  10.         <option value="12">December</option>
  11.     </select>
  12.  
  13.     <script>
  14.         $("select").multipleSelect({
  15.             placeholder: "Here is the placeholder"
  16.         });
  17.     </script>
  18. </body>
  19.  
  20.  
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.
May 19 '15 #2
Posting simpler code

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <title>Hello World</title>
  4. <link rel=stylesheet type="text/css" href="Helloworld.css">
  5. </head>
  6. <body>
  7. <h1>testing CSS</h1>
  8. </body>
  9. </html>
  10.  
Expand|Select|Wrap|Line Numbers
  1. body {background-color:lightgray}
  2. h1   {color:blue}
  3. p    {color:green}
  4.  
May 19 '15 #4
computerfox
276 100+
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:

Expand|Select|Wrap|Line Numbers
  1. body {
  2.  background-color:lighgray;
  3.  }
  4. h1{
  5.  color:blue;
  6. }
  7. p{
  8.  color:green;
  9. }
  10.  
Try:
Expand|Select|Wrap|Line Numbers
  1. <link href="Helloworld.css" rel="stylesheet" type="text/css"/>
  2.  
Also, can you try putting the styles before the JQuery import.

Hope that helps.
May 21 '15 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: pigeon | last post by:
SSL only works when ms sql server has "force encryption option" turned on... If I turn that off, and try to have the client software request encryption.. I get a ssl security error msg. The...
33
by: n00m | last post by:
import socket, thread host, port = '192.168.0.3', 1434 s1 = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s2 = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s2.connect((host, 1433))...
1
by: Andy | last post by:
We have an ASP.NET application exported from MS Access 2003. I uses a series of queries to generate a page showing todays bookings. It works locally but does not work when we put it on a...
17
by: Paul | last post by:
On my development computer, I have virtual named host set up, like www.site1.lab. When I upload those to my web site for customer review under mywebsite.com/clients/site1/ it throws some of the...
9
by: schmeckel | last post by:
I am trying to use some very basic AJAX functionality (update panel for partial page update) on my website. When I run my webpage in VS 2005, the partial page update works fine. However, when I...
10
by: rbenditt | last post by:
I've put together a simple script that uses the XMLHttpRequest() function. It works when I run it locally, but when I upload it to my web hosting account, I never get a response back. Here is what I...
2
by: dogged | last post by:
Website works locally but not when deployed ================================== Can someone please help with what I hope is a common problem (I’m new to .net). I have a simple website generated...
5
by: Corrie | last post by:
Hi, I've been trying to create a menu with animated mouseOvers using script instead of Flash. It works locally in Firefox but won't load at all in Safari (blank page). Then when I upload it to the...
1
by: Jordyn Burdick | last post by:
I have a simple rotating banner javascript on the site I'm developing. It works perfectly locally but once I upload it to the server it doesn't. Is there something wrong with my code? Why would it...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.