Jump to content
Vihart

Trying to understand CSS

Recommended Posts

Hmm, I don't think we can get to any conclusion with the current information.Are you able to put this somewhere online for use to see it?
its a test website so i cant get it online :/ but i created a new post with all the details compiled into one post and the beginning of this post i made lots of mistakes :)

Share this post


Link to post
Share on other sites
its a test website so i cant get it online :/ but i created a new post with all the details compiled into one post and the beginning of this post i made lots of mistakes :)
that's not really necessary. It's the same issue, no difference. We should keep this to the same thread so people can choose to follow from the beginning, (instead of recommending previous suggestions) and those who have been following along will already by up to speed anyway. No one's even left this thread or tried to stop helping you. More than likely the threads will get merged anyway. Why not try the simplified example that beon_robot suggested, and I backed up? just the color of the header, and just some basic text. No special characters, no funky fonts, no nothing. I'm guessing though it has something to do with the name or location of the CSS file.edit: yup, got merged, just like I expected. Edited by thescientist

Share this post


Link to post
Share on other sites

It's a nice summary, but there's no need for a separate topic. I've merged your summary with the rest of the topic so that it's clear what have you stumbled upon before (and therefore, where we could've missed something).I too would urge you to first try the reduced sample I gave you, and built on it, element by element, if it works.Just a thought... is "mystyle.css" actually called "MyStyle.css", "mystyle.CSS" or something like that? Capitalization matters you see... it must be exactly "mystyle.css" - all lowercase, including the extension.

Share this post


Link to post
Share on other sites
It's a nice summary, but there's no need for a separate topic. I've merged your summary with the rest of the topic so that it's clear what have you stumbled upon before (and therefore, where we could've missed something).I too would urge you to first try the reduced sample I gave you, and built on it, element by element, if it works.
exactly. If that basic, bare bones example doesn't work, the problem is somewhere in the file system, not the code.

Share this post


Link to post
Share on other sites
that's not really necessary. It's the same issue, no difference. We should keep this to the same thread so people can choose to follow from the beginning, (instead of recommending previous suggestions) and those who have been following along will already by up to speed anyway. No one's even left this thread or tried to stop helping you. More than likely the threads will get merged anyway. Why not try the simplified example that beon_robot suggested, and I backed up? just the color of the header, and just some basic text. No special characters, no funky fonts, no nothing. I'm guessing though it has something to do with the name or location of the CSS file.edit: yup, got merged, just like I expected.
ok sorry about trying to make a new post :) i changed the CSS external style sheet to the version you and boen robot suggest and it still doesnt work so the name or location may be the problemokay il try and explain the location of all the files : all the files that relate to my practice website are in one folder located on my desktop in this file are as follows :html files(links from the mainpage) type- Chrome HTML Documentmainpage.htmabout us.htmfee.htmkids.htmadult.htmtopics.htmbeginners.htmkeywords.htm my body.htmanimals.htmthe css external style sheet type- cascading style sheet documentmystyle.cssand a folder for the mio picture(for the image for mainpage.htm) miopaint.jpg type- jpg filei messed up before with links with capital letters - i rechecked and the css name does not have capital letters - and the code on the html css link does not have capital letters Edited by Askey

Share this post


Link to post
Share on other sites

Change the HTML too... If you'd like to preserve the current main page, create a new HTML page with the suggested minimal content, and see if that new page becomes with a red heading. If it does, gradually copy everything from the main page to that new page, until it breaks again.

Share this post


Link to post
Share on other sites
Change the HTML too... If you'd like to preserve the current main page, create a new HTML page with the suggested minimal content, and see if that new page becomes with a red heading. If it does, gradually copy everything from the main page to that new page, until it breaks again.
Great idea thanks il try that now

Share this post


Link to post
Share on other sites

okay so the new html file is called mainpage1.htm this is the code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>Humming Bird</title><link rel="stylesheet" type="text/css" href="mystyle.css" /></head><body><h1>Humming Bird</h1></body></html>

currently the css code is :

h1{color: red;}

the heading still hasnt turned red

Share this post


Link to post
Share on other sites

it might be worth trying to clear your browsers cache.edit: and you have nothing but that code in the CSS? absolutely nothing else?

Edited by thescientist

Share this post


Link to post
Share on other sites
it might be worth trying to clear your browsers cache.edit: and you have nothing but that code in the CSS? absolutely nothing else?
no i have nothing else in the css external style sheet - i learnt about the style tags only used for internal style sheets - i already made the mistake before cleared the browser cache - nothing changed the heading is still black

Share this post


Link to post
Share on other sites

now that you mention the browser cache - my C drive is pretty full and only has 1.14 GB if that makes any difference?edit:what about the DNS cache ?

Edited by Askey

Share this post


Link to post
Share on other sites

There's no alternative... perhaps if you find a free web host, and upload your files there? Maybe we can take a look at why it's not working... who knows, uploading them may even solve the problem.

Share this post


Link to post
Share on other sites
There's no alternative... perhaps if you find a free web host, and upload your files there? Maybe we can take a look at why it's not working... who knows, uploading them may even solve the problem.
ok get a free web host and upload em - il get on it any suggestions on a web site that provides free web hosts please? Edited by Askey

Share this post


Link to post
Share on other sites
ok get a free web host and upload em - il get on it any suggestions on a web site that provides free web hosts please?
Type in google search "Free Web Hosting"Just need anything to show us the code live. Ads don't even matter at this point. Edited by DizzyDan

Share this post


Link to post
Share on other sites
Type in google search "Free Web Hosting"Just need anything to show us the code live. Ads don't even matter at this point.
i know but some sites look fishy , offering free trial then charge you later, or offer you something free but not give you the option to customise it with programming.

Share this post


Link to post
Share on other sites
i know but some sites look fishy , offering free trial then charge you later, or offer you something free but not give you the option to customise it with programming.
what's the point. If you don't give them your payment information, then they can't charge you anything, even after the 'trial' is over. Also, right now were just trying to figure out a CSS problem. If you start getting into back-end stuff then worry about that then. (and even at that point, you can just run it locally). If you're still stuck, just search the forums. There's a pinned topic just about free hosts.

Share this post


Link to post
Share on other sites

okay so currently i have signed up to deluxe free web host (x10Hosting ) and editing it in something called cPanel X - i tried the simple html and css code and it didnt work maybe im applying the code wrong or ive placed them in the wrong area http://hummingbird2.x10.mx/ heres the scabby link - youl notice it isnt very organized - just look for mainpage and youl see that the heading isnt red - but you can also see the css file so maybe i need to place that in a different folder - or change the folder name.i did read the tutorial but it seems like the type of webhosting for people who know what they are doing - but im looking forward to getting to know the ins and outs of it regardless im sorry about this entire mess please remember that im completely new to all this.edit :lmao - or rather you will see a red heading - i changed the permissions on the html folder :) sorry about that so how would i do this with practice website on my computer (would help for the future)

Edited by Askey

Share this post


Link to post
Share on other sites
well i see a red H1 'Humming Bird' heading, so what's the problem?
sorry dsonesuk bad timing - i went back to tinker with it some more and it worked then i edited the post and you got there first :)

Share this post


Link to post
Share on other sites

Everythings working now im working on the code online rather than on my desktop, such a simple thing to make it work and now i can see the website shape as i make iti would like to thank eyeryone for helping me - especially boen robot , thanks for the advice, thanks for editing all the mistakes in my code,thanks for your patience and thanks for taking the time to help a newbie :)

Share this post


Link to post
Share on other sites

did you ever try clearing your browsers cache? (when testing locally)

Share this post


Link to post
Share on other sites
did you ever try clearing your browsers cache? (when testing locally)
Never mattered. Cache or no cache, without permissions, the browser never loaded the CSS.

Share this post


Link to post
Share on other sites
Never mattered. Cache or no cache, without permissions, the browser never loaded the CSS.
his post implied he was still not getting it to work locally. Permissions only solved the problem on the host.
okay so currently i have signed up to deluxe free web host (x10Hosting ) and editing it in something called cPanel X - i tried the simple html and css code and it didnt work maybe im applying the code wrong or ive placed them in the wrong area http://hummingbird2.x10.mx/ heres the scabby link - youl notice it isnt very organized - just look for mainpage and youl see that the heading isnt red - but you can also see the css file so maybe i need to place that in a different folder - or change the folder name.i did read the tutorial but it seems like the type of webhosting for people who know what they are doing - but im looking forward to getting to know the ins and outs of it regardless im sorry about this entire mess please remember that im completely new to all this.edit :lmao - or rather you will see a red heading - i changed the permissions on the html folder :) sorry about that so how would i do this with practice website on my computer (would help for the future)

Share this post


Link to post
Share on other sites

Hm... yes... good point... well then, one more thing to try on the local machine: ensure the file permissions are appropriately set.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...