473,386 Members | 1,883 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,386 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 3507
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...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.