cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution

CSS not showing on Website

I have developed a website using HTML, CSS, & Angular JS. It's working fine in my laptop, but got problem after deployment. All the files are uploaded to Public_html, but CSS and Angular JS are not working. Please suggest.

Sandeep
17 REPLIES 17
Super User II Super User II
Super User II

Re: CSS not showing on Website

@sandeepcs2005 

 

Most likely a path issue if the site is not finding the files.

 

This probably due to the paths to those files being relative to your local environment vs. where they are on the server.  

 

If the relative paths do not match where they are on the server try changing the paths to your files to absolute/full paths.  In your case based on what you mentioned http://www.mydomain.com/style.css  --  and see how that goes...

 

HTH! 😉

Judith
"Many of life's failures are people who did not realize how close they were to success when they gave up." ~Thomas Edison

New

Re: CSS not showing on Website

hi,

 

my css is also not working.

i don't understand what you mean by 'relative paths'? 

 

i know the files once worked, as the website was once live. but now i uploaded all the files again, to the public_html folder, but the css is not being read. would you have any advice?

 

thanks!

Super User II Super User II
Super User II

Re: CSS not showing on Website

@4zoe4

 

Here are examples so you can check your code:

 

Relative Paths
    index.html
    /images/photo.jpg
    /files/style.css

Absolute Paths
    http://www.yoursite.com
    http://www.yoursite.com/images/photo.jpg
    http://www.yoursite.com/files/style.css

 

For more on file paths: HTML File Paths

 

HTH! 😉

Judith
"Many of life's failures are people who did not realize how close they were to success when they gave up." ~Thomas Edison

Re: CSS not showing on Website


@Muse wrote:

@4zoe4

 

Here are examples so you can check your code:

 

Relative Paths
    index.html
    /images/photo.jpg
    /files/style.css

Absolute Paths
    http://www.yoursite.com
    http://www.yoursite.com/images/photo.jpg
    http://www.yoursite.com/files/style.css

 

For more on file paths: HTML File Paths

 

HTH! 😉


I am having issues as well. I use dreamweaver and my css files show up fine there, but when I upload they do not show up on my web page. They show up if I type the link in manually. I have a folder /assets/css/main.css

Re: CSS not showing on Website

Getting really frustrated, godaddy has been NO help in resolving my issue. I can manually type in the path in my browser and the css files show up fine. Is there anything special in the way of software that I have to add to my godaddy side of things to execute css files?

Super User II Super User II
Super User II

Re: CSS not showing on Website

@Bulldogger

 

The fact you note that locally in Dreamweaver all is well, but when you upload to the server it doesn't display -- here again, sounds like a path issue. The path you manually type into your browser is the full URL that has to also be in the code.   No special software needed -- just the correct and full path.

 

Do you have URL I can take a peak at? 😉

 

On an aside, GoDaddy's job is to make sure the hosting server is operational -- not that every page/site uploaded to the server has valid code to make the site display as the site owner intends.

 

Let me know on the URL and I'll take a look for you!

Judith
"Many of life's failures are people who did not realize how close they were to success when they gave up." ~Thomas Edison

Re: CSS not showing on Website


@Muse wrote:

@Bulldogger

 

The fact you note that locally in Dreamweaver all is well, but when you upload to the server it doesn't display -- here again, sounds like a path issue. The path you manually type into your browser is the full URL that has to also be in the code.   No special software needed -- just the correct and full path.

 

Do you have URL I can take a peak at? 😉

 

On an aside, GoDaddy's job is to make sure the hosting server is operational -- not that every page/site uploaded to the server has valid code to make the site display as the site owner intends.

 

Let me know on the URL and I'll take a look for you!


www.lottabull.com Thanks for helping out. Also, I am using server side includes

Super User II Super User II
Super User II
Solution

Re: CSS not showing on Website

@Bulldogger

 

What a clever URL for your pups! 😉   Since I can't tell what the site should look like, I can see in the code:

<link href="/assets/css/main.css" rel="stylesheet" media="screen" />

Try changing the above to: 

<link href="http://www.lottabull.com/assets/css/main.css" type="text/css" rel="stylesheet" media="screen" />

and see if that makes a difference. I do not know your server structure or platform to advise further than that.

 

I also saw:

}
.mainContent a:visted	{
	color: #ffffff;
	text-decoration: none;

The above should probably be a:visited?

 

HTH! 😉

Judith
"Many of life's failures are people who did not realize how close they were to success when they gave up." ~Thomas Edison

Re: CSS not showing on Website

Hi! this issue has been occurring. I can relate, and right now it happens again. Judith, I do have a page which some sections where my CSS is working and to section also it is not.

 

I understand about relative paths. And I used <base href=""> on the header.

Super User II Super User II
Super User II

Re: CSS not showing on Website

@JackSparrow1223

 

How about sharing your URL and the specific page where this is happening?

Judith
"Many of life's failures are people who did not realize how close they were to success when they gave up." ~Thomas Edison

Re: CSS not showing on Website

Hello Muse,

  I have some what similar problem. My coding is design to provide absolute paths to all documents needed.


  I am able to serve images, and css just fine. But I am trying to use javascript file, and be able to serve it. I figure since the other files don't go directly to the index.php, it should get served, but it doesn't. What happens, is that it goes directly to the index.php, and not retrieving the (*.js) file,  any suggestions would be welcome. I give you and Idea of the .haccess file, just incase I am missing something there, or If I have to do something in the cPanel please let me know. Thank you in advance.


Image e.g.
CSS e.g.
JS e.g.

 

This is my .haccess

 

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.mysite\.com [NC]
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTPS}:s on:(s)       
RewriteRule ^(.*)$ http%1://www.mysite.com/$1 [L,R=301,NC]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ./index.php [L]

</IfModule>

New

Re: CSS not showing on Website

Hi,

 

Just uploaded lifestorespharmacy.com and I am having the same issue. CSS is not showing. I have tried adding the url to the path and nothing has worked

Super User II Super User II
Super User II

Re: CSS not showing on Website

 

@CKK

 

In looking at your code you have relative paths.  As an example:

 

 

<link href="css/normalize.css" rel="stylesheet" type="text/css">

Using an absolute path would point to your file and should work:

 

 

 

<link href="http://lifestorespharmacy.com/css/normalize.css" rel="stylesheet" type="text/css">

The above is where your file is located.  If you put the absolute path in your code and it still does not work, I would then get in touch with GoDaddy to find out if something else is the cause.

 

HTH! 😉

 

Judith
"Many of life's failures are people who did not realize how close they were to success when they gave up." ~Thomas Edison

Solution

Re: CSS not showing on Website


@CKK wrote:

Hi,

 

Just uploaded lifestorespharmacy.com and I am having the same issue. CSS is not showing. I have tried adding the url to the path and nothing has worked


I tried all kinds of things and finally found that all my files were html files. All I had to do was rename the html extension to asp on every page that I have and all worked out great!

New

Re: CSS not showing on Website

I have the sam issue !

Re: CSS not showing on Website

Has anybody ever got an answer for this issue?  The new web-builder allows you to just add a HTML box wherever you like on your page then you just input the code.... I input the java-script code provided by my ads site and it doesn't show?  Here is the code:

<script type="text/javascript">
atOptions = {
'key' : '11ab6f003da398dc9c12264e2f9cf245',
'format' : 'iframe',
'height' : 50,
'width' : 320,
'params' : {}
};
document.write('<scr' + 'ipt type="text/javascript" src="http' + (location.protocol === 'https:' ? 's' : '') + '://www.bcloudhost.com/11ab6f003da398dc9c12264e2f9cf245/invoke.js"></scr' + 'ipt>');
</script>

Re: CSS not showing on Website

No one was ever able to provide a solution. Spent hours on phone with
godaddy and nothing. I decided to try a few things and found that my pages
didn't show up with the html extension, changed a few pages to asp instead
and all worked good then. I changed all my pages to asp and I was back up
and running.