I am new to website development. I am having problem linking my external css to my index page.
This is the structure of my website.
and I tried to link to my external css using this code
<link rel="stylesheet" type="text/css" href="../css/main.css"/>
but I keep on getting error in Google Chrome as such
The path shown are the correct path of the css file. What have I done wrong? By the way, I am doing this on localhost using MAMP. Can anyone help me? Thanks in advance
"Restart the MAMP and try it on different path seems to work now. Thanks for all the help."
Generally speaking most websites in LAMP reside inside the public_html directory, so everything you want externally accessible should go inside that. i.e move the css and the images folder inside public_html
May be the css file has some permission related issue.
Or
Try by giving absolute url that always works.
Restart the MAMP and try it on different path seems to work now. Thanks for all the help.
Related
I made a static site with Tailwind CSS and it's working locally but it's not working on GitHub Pages. I don't know what to do. Pls help.
Do you have a link to your Github Pages website so we could check what's wrong ?
A hint : Check in your console if your stylesheet link is wrong or isn't found. I'd guess on an absolute path pointing to root, instead of a relative path, but it's a wild guess without more info about your code.
I am facing the CSS file issue on the ghost platform. When I made the changes on handlebar file and CSS file of ghost page then after making the theme live on ghost pro, I will observed that .hbs file changes are reflected on the live site but .css file changes are not reflected, I was tried on many ways to solve the issue but i didn't get the proper solution. So can anyone help me out from these problem, it's really very helpful to me.
Regards,
Akshay Khedkar
The media library only displays one thumb which is unidentified and stops downloading all previous media that were uploaded.
I do not know what seems to be the problem. I have disabled all plugins and tried but the problem still existed.
Anyone has this problem before? and how to solve it. Thank you.
Edited : Guys, thank you for your help. I have looked up online and it seemed like when I imported database, I didn't do it correctly which caused _postmeta and _posts to not have AUTO INCREMENT in the database. I am going to fix it and see if that helps.
Just found the solution. When I migrated website from localhost, at
Settings>Media, somehow the localhost URL was remained there at Path
value. Therefore, I had to make a change there to be
wp-content/uploads
In general to fix this problem you have to check the file permissions of your uploads folder (wp-content/uploads). Try to set the numeric value to 755.
Please specify the error as you are able to see it most probably this issue is occurring due to uploads folder permission issue.
Looking forward to help you more on this.
Just reinstall the wordpress, may be installing issue
A Wordpress novice and have set up my site locally using MAMP.
Unfortunately all the links to styles and I assume the database etc are by default pathed using 'localhost' so the site works ONLY on my machine. What is the correct way to change this pathing so that wordpress will correctly display the site?
For the database, you can edit the wp-config.php file at the root of your site.
As far as your styles are concerned, you'll have to go through the theme files that you've setup and adjust the relative path to those style sheets.
There are several options. Kyle is correct about editing wp-config.php, that will definitely take care of the new DB connection. However, I would advise against a manual adjustment of stylesheets and markup if possible. The easiest way for a novice might be this: export the DB from your local installation using "Settings > Export." Then, in your remote installation, use the WordPress Importer and it should tidy up all the links for you. This has worked for me several times.
You can learn more about other options here: http://wp.tutsplus.com/tutorials/hosting/how-to-break-a-wordpress-install-and-fix-it-again/
UPDATE: unless of course you've hardcoded "localhost" in your stylesheets and markup. In that case, use one of the solutions in the above link.
If your theme uses serialized data, you might have a problem when moving your website by simply doing a find and replace and changing the URL that way. I would recommend following WordPress's guide when you're moving your site.
http://codex.wordpress.org/Moving_WordPress
It involves using a special script to change the URL of your site.
I'm working with Drupal 7.2, till now i have worked on somebody's localhost,now i decided to work on my own PC, so i make a copy of original code form other's PC and paste it to my localhost WAMP and also upload database into my localhost/phpmyadmin, but some how its not working at all.
CSS not been applying to the site, its displaying all the content without CSS. can anyone help me for this issue?
I tried out by clearing a cache from admin side as well as from browser.
Thanks.
Not just the cache but the aggregating too make sure you clear all the check boxes
Cache pages for anonymous users
Cache blocks
Even those under bandwidth optimization
Aggregate and compress CSS files.
Aggregate JavaScript files.
Works like a charm. Thanks guys
Presumably you're seeing the Drupal site itself (implying your db/web server/php settings are ok) but just unthemed? Have you tried clearing the Drupal caches? As you lifted the database from another host it's possible you might need to do this to force drupal to rebuild it's menu paths.
You should check the source code of the site on your localhost and check that the file paths to the css style sheets is correct. Using Google Chrome Developer Tool you can update the paths and see when they take affect or just keep updating your templates until you get it right. Also check that any options in the database are using your localhost and not the other domain
You may try following to debug:
Clear Drupal cache from admin/settings/performance.
Rebuild theme registry.
Add a new theme to your site and see if it is rendering the content properly.
I see the same problem, yet no solution suggested has resolved this... I notice in source code that it seems to truncate the css paths to be at site root i.e. < link type="text/css" rel="stylesheet" href="http://dev.drupalsite.com/installed_dir/ media="all" > ... hmm