How can I fix css not loading on server? | SoloLearn: Learn to code for FREE!

+3

How can I fix css not loading on server?

I have a problem with my css and image files. The work properly on the local server but once on line, the are not loaded

9/24/2020 11:01:22 AM

Tafinasoa Rabenandrasana

14 Answers

New Answer

+3

Tafinasoa Rabenandrasana good luck bro 👍

+2

Tafinasoa Rabenandrasana Hi there im help out regarding your question. Please share the code..

+2

what type of error u caught ?? without full source code how i will help u

+2

please look <!DOCTYPE html> <html lang="en"> <head> <title> Enter Title </title> <link rel="stylesheet" type="text/css" href="styles.css"> or use <style> body{ margin:0; } </style> </head> <body> <p> Enter TEXT </p> </body> </html> *this is basic structure of webpage

+1

Tafinasoa Rabenandrasana please share with me full code

+1

in Server please use this method=> <link rel="stylesheet" type="text/css" href="http://yourip.com/yourstylesheet.css"> it works

+1

Unfortunately, still don't work,

+1

The page just loads without the css and the img also, from server support, I read that It is caused by incorrect static content selections in the web.config. To fix it I need to put <clear /> in this file but it looks like it is not found on any directory.

+1

It works when I put the style in the header, I really want to understand why it's no working on external css, it 's always better to have a Splited project 😅

+1

Thanks a lot, you to 👊

0

Thanks for answering

0

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous"> <link rel="stylesheet" href="IndexStyle/style.css"> <link rel="stylesheet" href="IndexStyle/index-tab.css"> <link rel="stylesheet" href="IndexStyle/tab.css"> <link rel="stylesheet" href="IndexStyle/landphone.css"> <link rel="stylesheet" href="IndexStyle/landtab.css"> <title>Accueil</title> <style> </style> </head> <body> <header> <div class="container-fluid"> <div class="row"> <div class="col-lg-2 col-md-12 col-sm-12"> <img src="Ressources\Image\logoB&W.png" alt=""> </div> </div> </div> </header> <main> <div class="

0

Okay I'll try it, 😊

0

reruns the surver