Click here to Skip to main content
15,882,152 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I'm designing a website in C# and using Bootstrap
My problem is when I try the site on another computer, the design I made does not apply and the site appears unacceptable, knowing that I take all the site files
Even though it works fine on my device only

What I have tried:

Is there a code or a way to install the site design on all devices?
Posted
Updated 29-Mar-22 6:10am

There is no "lock" as you call it. Your layout (HTML and CSS) is probably written to work on a single browser width, specifically, on your machine.

You have rewrite the HTML and CSS under a concept called "responsive". There is no one way to do that and what you do depends entirely on how you layout your pages with respect to the screen size of the various devices customers will view the pages on.

Google for "responsive html css" and start reading. You've got a lot of information to go through, far more than can be typed into a forum environment like this.
 
Share this answer
 
You don't "install the site design" on a device; you serve up the required CSS, image, font, and Javascript files from your server.

At a guess - and it can only be a guess, since you've provided zero context - you've linked to the CSS files using the local file path on your computer. For example:
HTML
<link rel="stylesheet" href="C:\Users\No\This\Is\Wrong\DontDoThis.css">
When a user accesses your site using an https: URL, that link won't load. Even if the user had precisely the same version of your CSS file in precisely the same path on their computer, all modern browsers block websites from loading files from the user's local computer.

Instead, you should be using a relative path to your files - eg:
HTML
<link rel="stylesheet" href="/css/YesDoItThisWay.css">
Alternatively, standard files such as Bootstrap can be loaded from a Content Delivery Network (CDN):
HTML
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900