I am using somee.com free hosting. However, my web site cannot read the style sheet. But it can display well in localhost.... HELP. Thank you...

Dani AI

Generated

For — when a site looks correct on localhost but the stylesheet fails on the host, treat it as a static-file delivery problem and follow a short, ordered diagnosis. and were pointing in the right direction; below are practical checks and small fixes that work for most hosting surprises.

  • Open Developer Tools (Network tab) and reload. Find the .css request and note the HTTP status and Response headers. A 404 means the file path is wrong on the server; 403 means permission; 200 with HTML in the body usually means the server returned an error page instead of the CSS. Confirm the Content-Type is text/css.
  • Copy the stylesheet URL from View Source and paste it directly into the address bar. That isolates file-serving from page rendering.
  • Make sure the href is a web path (absolute from app root or relative), not a local filesystem path or http://localhost URL. If your app lives in a virtual directory, resolve app-rooted paths on the server side so links stay valid after deployment.
  • Check filename case (Windows is case-insensitive; many servers are not). Also clear browser cache or add a query string version (?v=1) to force reload.

Example references that reliably resolve in ASP.NET:

<link rel="stylesheet" href="/styles/site.css" type="text/css" />
<link rel="stylesheet" href="<%= ResolveUrl("~/Content/site.css") %>" type="text/css" />

If those checks fail, upload a tiny test.css (e.g., body{background:red;}) and try to fetch it directly. If it still won’t serve, examine the hosting control panel logs or contact support — free hosts can sometimes block or rewrite static content (as and warned). These steps pin down whether it’s a path/permission/MIME problem or a host policy issue.

Recommended Answers

All 4 Replies

Have you got your folder structure the same on your host as on your local machine?

commented: tq very much.... i have put the style sheet in wrong folder.... +0

How are you referencing the stylesheet from your HTML page?

free hosting is neverr faithful

Free hosting is not good for website.you can chose cheap and best hosting.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.