Site hosted on dropbox not using CSS - css

I'm hosting a (very) small website on dropbox. I don't even have a domain name for it, I just need an easy way for my not so technology savvy teacher to access it and using an online service like wordpress or tumblr seemed like too much trouble and not as effective as I would like. I plan on putting it in my public folder and just sending her that link, something I've done in the past to show my friends websites I've made in class.
However, for some reason, CSS formatting isn't working. This is a problem I've noticed in the past but at the time wasn't important. I have it relatively linked in my head tag and it works when I pull up the files saved on my hard drive. Its only when I try to access it through dropbox do I notice this problem.
I've looked and it doesn't seem like anyone else has had this problem, I've only found multiple references to dropbox supporting CSS so I have no idea why this is happening.
This is the link in my code, and it's inside the head tag:
<link rel="stylesheet" type="text/css" href="css/format.css" />
Any help would be much appreciated. ^^
EDIT: Here's the page, there's not much on it yet but there's suppossed to be background formatting behind the navigation links in the top.
https://dl-web.dropbox.com/get/Public/EPortfolio/WritingAndForum.html?w=947f0aa1

To give an example expanding on Cfreak's comment, you would need to individually share the CSS file, then reference it in the HTML like this:
<link rel="stylesheet" type="text/css" href="https://dl.dropbox.com/u/1234567/cssfile.css">

A much easier way (and more correct) is to put your stylesheet in a folder called css and then have a relative link to it with "./" It gets you out of the long url trouble.
<link rel="stylesheet" type="text/css" href="./css/styles.css">

Related

Springboot can't find resources! (Suddenly stopped working)

So the thing is, since I moved my resources (css, images, js) to resources/static folder my stuff started working.
Until I created a new .html page (meant to be dynamic) and pasted in resources/templates. Then all my resources (css, images) stopped working (can't be found) and I can't make it work again.
I'm using SpringBoot + Thymeleaf and the code can be found at GitHub
I couldn't manage to find a solution after 3 hours of searching, that's why I'm here. Thank you, hope you guys can help :/
Edit (some images):
My project structure
The link:
<link href="css/bootstrap.min.css" rel='stylesheet' type='text/css'/>
<link href="css/bootstrap.css" rel='stylesheet' type='text/css'/>
What happens (was working before, I didn't change anything in the code of listed images)
I'm not sure what happened but after starting deleting/commenting some code I wasn't using anymore I started to get errors and managed to track the next file to "fix" (delete or comment) and after that it worked again.
Looks like something in the application wasn't right and it didn't give me any erros so I had to manually try to find it.
I'll keep updating this thread if I find anything useful related.

Jekyll on Github Pages applying css styles inconsistently

I am not sure what's going on, but my personal site - built with Jekyll and hosted on Github pages - has been exhibiting odd css styles behavior as of the last few weeks or so.
I originally set it up on Jekyll 1.something-or-other. I am aware that it is at 3.something now and for the longest time, through 2 etc. I have not had a problem with the styles, everthing was fine up until less than a month ago.
I have not made any changes to the styles configuration for a couple years, but now it is only rendering the styles for the pages (Homepage, About Page, list pages for archives, etc.). But on the actual posts, it drops all the styles - looks like raw markdown and images and no layout.
I have updated jekyll to 3.1.2 on my local machine, and what's even stranger is that when I run it locally, it builds fine and all, but the problem is the opposite. That is, all the posts are formatted with the appropriate styles, but the pages (again - Homepage, about page, archive list) are unstyled.
Again, no changes in any configurations. Is there some obvious places I should be looking? I am using the jekyll bootstrap theme that's a little customized. but not much.
Site is http://subtxt.in
I found your repo and poked around. There is a lot going on there, it seems overly complex.
Using Chromes dev tools you can see the problem is with the css loading - on good pages the correct path is: <link href="/assets/themes/the-minimum/css/style.css" rel="stylesheet" media="all">
On posts where it doesn't work it is: <link href="/assets/themes//css/style.css" rel="stylesheet" media="all">
Note the missing theme name - the-minimum.
In your repo I can't quite figure out the logic, but you could simplify it I think. This file - _includes/themes/the-minimum/default.html I believe contains the head section for all pages.
The line <link href='{{ ASSET_PATH }}/css/style.css' rel="stylesheet" media="all"> I think is the problem, `ASSET_PATH seems to come back with different values. Try just hard coding it to be the correct path like:
<link href="/assets/themes/the-minimum/css/style.css" rel="stylesheet" media="all">
I'm not 100% sure this will fix it, but I think it will.
I would add a link to your repo if this doesn't fix it for you so other people can check it.

custom 404 sometimes missing stylesheet

I have a website hosted by siteground, and my custom 404 page is SOMETIMES missing it's stylesheet. I contacted support but they saw it working fine, assumed I just codded it wrong, and told me to get help form a professional web programmer... (of course I did test before contacting them to be sure it was not my fault)
Anyways, the way that siteground allowes you to create a custom 404 page is to add your html code to a form in your control panel, wich creates a 404.shtml in your main folder. The .shtml contains all your html. I have done the following test to narrow down the problem.
created a not404.html in my main folder with code copy pasted from my 404.shtml that is in the same folder. It loaded with my stylesheet applied no problem.
tried prompting a 404 page with both bad hyperlinks, and by typing pages that do not exist. When I am having the problem with my stylesheet missing, none of thease pages have css, but when I am not having the problem, they all have css applied.
What I think it is: I think that the 404.shtml is not really in my main folder, but just appears to be there, and sometimes that link breaks and the 404.shtml is actualy acessed somewere else on sitegrounds server, therefor the style link would not work properly. This would explain the intermittent css failor. But this is just logic, not understanding.
The only thing I can think of that would be wrong on my end is if there is more than one way to link stylesheets, and my way is a bit unstable. Here is the format I use.
<link type='text/css' rel='stylesheet' href='css/404.css'>
I know this might be a difficult question, but it would be pretty satisfying to figure this out and inform them of the problem with their site.
Change the href for the style tag to be absolute. So this:
<link type='text/css' rel='stylesheet' href='css/404.css'>
Becomes this:
<link type='text/css' rel='stylesheet' href='/path/to/css/404.css'>
css/404.css is a relative path. If the path is something like /path/to/nonextant/page it will try to load the stylesheet from /path/to/nonextant/page/css which does not exist.
Use an absolute path:
/css/404.css

joomla wrong base href results in wrong CSS template

I have installed Joomla 3.x and some modules.
One of my modules is to display articles from certain categories of my articles, but when I navigate to my article, the CSS stylesheets do not load.
When I view the source, I discovered that the URL for the CSS stylesheet in the page above becomes:
<base href="http://cambridge.mywebcommunity.org/index.php/10-%E7%88%B1%E7%AB%8B%E6%96%B9%E5%8A%A8%E5%90%91%E6%9B%B4%E6%96%B0/3-welcome-to-your-blog" />
... instead of the original I put in, here:
<base href="http://cambridge.mywebcommunity.org/" />
This also happens to another CSS stylesheet from the module. The CSS URL loads like this:
<link rel="stylesheet" href="http://cambridge.mywebcommunity.org/10-爱立方动向更新/modules/mod_news_pro_gk5/interface/css/style.css" type="text/css" />
... instead of the original CSS URL that I put in:
<link rel="stylesheet" href="http://cambridge.mywebcommunity.org/modules/mod_news_pro_gk5/interface/css/style.css" type="text/css" />
So I have figured out that the issue is the URLs are not being added by Joomla correctly. How would I go about fixing this?
From what you've posted it looks like you (or extension developers) are trying to add css with absolute links. Looking at the source of your page will quickly show you that your links look different from the core links in that they are absolute not relative. You may need to look a the code in the modules doing this and fix or contact the developers and ask them to fix. Also ask them about the js.
In Joomla you add style sheets with code like this in your template index:
$doc->addStyleSheet('templates/'.$this->template.'/css/template.css');
The change in behavior is most likely due to a recent security fix concerning uris in the header. I'm not going to link to details of the exploit but easy enough to find out why this was changed, but it was for good reasons.

Weird page loads sometimes in Rails 3.2 could be CSS?

I've only been programming for roughly 20 weeks so every problem I run into is new to me...
I'm not quite sure, but I suspect that sometimes my page loads prior to all my CSS files loading because I'll see the page content for a brief second then suddenly the CSS takes over and presents the page.
Any ideas on what I could possibly do to fix this? If this is a little hard to imagine, my website is http://www.instamap.it
yep, looking at your source, you should move the link for your css to the head in your application layout.
It's because your CSS is being linked at the end of your document instead of the beginning, so the page loads everything else first.
This line (169):
<link href="/assets/application-9541dd7ae253c39af6731980dce6e296.css" media="all" rel="stylesheet" type="text/css" />
should be in the head of your document. This way the CSS will load before everything else.

Resources