Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

HTML + CSS works on local machine but not once uploaded to server?

Featured Replies

Ive got a page that's coded in HTML + a CSS style sheet and few images. They work fine on my computer, no problem at all. I want to use them as a static front page on a Wordpress site. So after reading a few tutorials, it looked like I only need to add an additional line of code then upload it and use it as a page template.

 

So I did that and now the thing doesn't work at all. It can't find the style sheet I think (even though it's there) and no images either.

 

Here's the page on a test server so you can see what I mean. http://techdude.co.uk/test/

 

Any ideas?

IE says

 

Webpage error details

 

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB6.6; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; OfficeLiveConnector.1.5; OfficeLivePatch.1.3; .NET4.0C; .NET4.0E)

Timestamp: Tue, 14 Dec 2010 15:32:36 UTC

 

 

Message: Object expected

Line: 76

Char: 1

Code: 0

URI: http://techdude.co.uk/test/'>http://techdude.co.uk/test/'>http://techdude.co.uk/test/

 

 

Message: Object expected

Line: 135

Char: 1

Code: 0

URI: http://techdude.co.uk/test/

 

 

Message: Object expected

Line: 195

Char: 1

Code: 0

URI: http://techdude.co.uk/test/

 

 

 

Have you checked your paths?

  • Author

Yep. Alls in their correct places. CSS in the /scripts directory and images in the /images folder. I don't under stand it :/

It seems that you are linking to a stylesheet using "stylesheet.css" as the url is that correct or is it in another location?

Youve uploaded the stylesheet to the test directory & it's not there?

  • Author

The stylesheet is there.. it's just not showing up. I'm thinking that maybe this is Wordpress, maybe I need to use certain php commands instead?

What I mean is, if you type in the url in a browser, directly to the style sheet (http://techdude.co.uk/test/stylesheet.css) - it's not there!!

 

However it is here: http://techdude.co.uk/stylesheet.css , which obviously means that it is in a different folder to your actual page (which is in a folder called "test"). You need to either upload the css file to the test folder or add ../ to the beginning of the url you are currently using to link to the stylesheet.

 

I imagine it is for a similar reason that your images are not showing up too.

 

Hope this helps.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.