/    Sign up×
Community /Pin to ProfileBookmark

css file not being recognized.

I am having some trouble including my css file into my site.

This is my page and I have the following relevant code posted:

[CODE]
<!DOCTYPE html>
<head>
<link href=”css/index.css” title=”index.css” type=”text/css” rel=”stylesheet” media=”all” lang=”en” />
<link href=”../css/footer.css” title=”footer.css” type=”text/css” rel=”stylesheet” media=”all” lang=”en” />
<meta charset=”utf-8″ />
<title>PoemScribe – Personalized Poetry</title>

</table>
</div><!–secondtable–>

<?php
include (‘../poemscribe.com/templates/footer.htm’);
?>

</div><!–mainwrapper–>
</body>
</html>
[/CODE]

The first css file (index.css) works fine. Its the second css file (footer.css) that I can’t get to work. I believe I have it in the correct relation to the path of the footer.htm file.

Should I rename “footer.htm” to “footer.php” and add an include in the footer.php file for the footer.css file?

I am not sure what is wrong. Any help is appreciated.

Thank you,
Randy

to post a comment
CSS

17 Comments(s)

Copy linkTweet thisAlerts:
@NedalsAug 10.2011 — ../css/footer.css does not look right.

Are index.css and footer.css in the same directory?

If so it should be <link href="css/footer.css"....

If not, what does your directory structure look like.
Copy linkTweet thisAlerts:
@tuxandpucksauthorAug 10.2011 — Thanks for the reply. Yes, both CSS files are in the same directory: "css".

Honestly, it is "../css/footer.css" because I forgot to change it back. I was trying anything. I am still stumped.
Copy linkTweet thisAlerts:
@Frank62Aug 10.2011 — What do you (not) see if you have it rendered?
Copy linkTweet thisAlerts:
@tuxandpucksauthorAug 10.2011 — I don't see my footer centered and organized/dressed up as I had hoped it would be.

I am beginning to think that my php include file (which is the one I want the css to work on) can't except css because it is an "include" file.
Copy linkTweet thisAlerts:
@Frank62Aug 10.2011 — I am beginning to think that my php include file (which is the one I want the css to work on) can't except css because it is an "include" file.[/QUOTE]

No, that's not it. PHP includes are changed into HTML by the server and sent to the browser as such. Your browser doesn't know the difference. It must be a path problem. Can you put it online?
Copy linkTweet thisAlerts:
@tuxandpucksauthorAug 10.2011 — Thanks for the help. I'm sorry I am not sure what is meant by "Can you put it online?" Could you please clarify.

thanks,

Randy
Copy linkTweet thisAlerts:
@Frank62Aug 10.2011 — I'm sorry I am not sure what is meant by "Can you put it online?"[/QUOTE]
Can you put it on the web, so that we can see it 'live'? That makes it easier for us to analyze, helped by a Firefox plugin, called Firebug.
Copy linkTweet thisAlerts:
@tuxandpucksauthorAug 10.2011 — Absolutely. Thanks!

Here is the site link:

http://www.poemscribe.com

As you know the issue is the footer isn't centering or doing anything that I want it to based on my footer.css file.

Thank you!

Randy
Copy linkTweet thisAlerts:
@tracknutAug 10.2011 — Hmmm... you have many errors, both in the html and css. The unnerving one is the last html error, where the parser just gives up and says it can't parse any further. I wonder if the browsers are having the same trouble. I'd fix the errors and see where it gets you.

Dave
Copy linkTweet thisAlerts:
@tuxandpucksauthorAug 10.2011 — Thanks for the feedback.
Copy linkTweet thisAlerts:
@Frank62Aug 10.2011 — I agree with Dave.
Copy linkTweet thisAlerts:
@tuxandpucksauthorAug 11.2011 — I have successfully validated the html and css with my site and I was hoping you folks would give my issue a second shot as to why my footer.css file isn't being recognized.

Thanks,

Randy
Copy linkTweet thisAlerts:
@tuxandpucksauthorAug 11.2011 — Also, I have my setup as follows:

<head>

<link href="css/index.css" title="index.css" type="text/css" rel="stylesheet" media="all" lang="en" />

<link href="css/footer.css" title="footer.css" type="text/css" rel="stylesheet" media="all" lang="en" />

and when I flip-flop the two lines (footer.css listing first), that css works but not the second css file.

Not sure why.
Copy linkTweet thisAlerts:
@tracknutAug 11.2011 — Just for grins, pull out the "title=" stuff from those two CSS declarations. Are you using them in some way?

Dave
Copy linkTweet thisAlerts:
@tuxandpucksauthorAug 11.2011 — Aw! Excellent. That solved it, Dave. Thank you. I wasn't using the "title" for anything. Thanks again. Randy
Copy linkTweet thisAlerts:
@tracknutAug 11.2011 — No worries. Unfortunately I have no idea what just happened, I'd just never seen a "title" used in a css link before.

Dave
Copy linkTweet thisAlerts:
@Frank62Aug 11.2011 — Aw! Excellent. That solved it, Dave.[/QUOTE]
Good for you, but why was the first-mentioned stylesheet rendered then? That had 'title' in its tag too, didn't it?
×

Success!

Help @tuxandpucks spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...