Zaloguj | Zarejestruj | FAQ
Anonymous

css problem

+ Odpowiedz

Posty: 7 Strona 1 z 1


css problem

przez BigJK68845 » Pt sty 14, 2011 4:36 am

i am new to all of this and i am having a problem that seems like it should be very simple to correct but i cannot seems to.

when i open 2 notepad apps and create an external style sheet and an html file and link the css file to the html file with the tag
<link rel="stylesheet" type="text/css" href="style.css" />

text that i type in the html document shows up when i open it in a web browser but none of the styling does. furthermore when i view the source and click the link to the .css file it says it cannot be found.
Avatar użytkownika

BigJK68845

  • Posty: 3
  • Dołączył(a): Pt sty 14, 2011 4:30 am

Re: css problem

przez HTML.net » Pt sty 14, 2011 9:11 am

Make sure the HTML file and the CSS file are in same folder. That should do the trick :)

- Andreas, HTML.net
Avatar użytkownika

HTML.net
Site Admin

  • Posty: 1194
  • Dołączył(a): So wrz 11, 2010 11:24 am
--
Show some love for HTML.net on Twitter, Facebook and Google: Use the buttons on top of all pages.

Re: css problem

przez BigJK68845 » Pt sty 14, 2011 4:54 pm

I am now working on something from a different computer and tried this agian and it now works. I did everything the same; however, I was able to notice a difference and i dont understand why this would occur. When i saved the files today on this present computer, i saved the .css file as type=all files and name=style.css and as soon as i did the title of the notepad document becamse 'style.css - Notepad' and accordingly when i saved the .html file i saved it as type=all files and name=index.html and the name immediately changed to 'index.html - Notepad'. Then when i opened the file it worked just as it should. continue to next message.
Avatar użytkownika

BigJK68845

  • Posty: 3
  • Dołączył(a): Pt sty 14, 2011 4:30 am

Re: css problem

przez BigJK68845 » Pt sty 14, 2011 4:55 pm

Now last night, when the issue was occuring i noticed last night that when i saved the files, with the same parameters of 'all files' and style.css, i noticed that the title of the open document only changed to 'style - Notepad' *the .css was excluded from the title of the document. the same thing was occurring with the .html file, it would change the title to 'index -notepad;. I noticed this last night and thought that perhaps it was the cause, so i attempted to rename the files manually and include the .css and .html in the title of the documents however that didn not work last night either. I idint know if you had any insight into why the files were exclueding the .css and the .html from the file name upon saving them as such.
Avatar użytkownika

BigJK68845

  • Posty: 3
  • Dołączył(a): Pt sty 14, 2011 4:30 am

Re: css problem

przez HTML.net » Pt sty 14, 2011 7:36 pm

That sounds strange! Try to upload a screenshot if it continues.

- Andreas, HTML.net
Avatar użytkownika

HTML.net
Site Admin

  • Posty: 1194
  • Dołączył(a): So wrz 11, 2010 11:24 am
--
Show some love for HTML.net on Twitter, Facebook and Google: Use the buttons on top of all pages.

Re: css problem

przez rswebs » Pt sty 14, 2011 8:04 pm

why don't you try this and place it between <head> and </head>. File must be in the same folder.

<link href="yourcssfilehere.css" rel="stylesheet" type="text/css" />
Avatar użytkownika

rswebs

  • Posty: 77
  • Dołączył(a): Śr lis 24, 2010 6:47 am
--
Thanks Rafael - www.htmltutorialtopics.com

Re: css problem

przez The Cerial Killer » Pt sty 14, 2011 9:41 pm

Notepad does not show the file format in its bar... make sure the code is in between the <head> and </head> tags. (below the title line works for me) and try saving it is a htm file rather than .html its shorter but is the same... if it continues to be a problem show a copy of the code in your htm and css documents using the ([ code] and [/code ]) tags! (no spaces)
Avatar użytkownika

The Cerial Killer

  • Posty: 15
  • Dołączył(a): Śr sty 12, 2011 4:34 pm
--
I kill breakfast!


+ Odpowiedz

Strona 1 z 1