Saved Bookmarks
| 1. |
Solve : Link css help? |
|
Answer» I think I am getting the hang of Exturnale CSS And every page in the <header> Tags I putYes, but they don't have to be.Now one thing all my pages have In the head tags and the page with all the css code that they link to in called test.css and I have it in th same directory. But my pages are not showing the IMAGE as the background they all White and the color should be Black if the image can't show. And nothing els works right the Text is black should be wight. So I don't think I am linking to the test.css file right Sould I have not / at the end of or am I missing something Quote link ref="stylesheet"Change ref to rel.Thanks for all you help I now use this as the CSS exturnale code body { background-color:#00000; background-image:url(wall.jpg); background-repeat:repeat; } a:link { color:#FFFF00; } a:VISITED { color:#FFFF00; } p{ font-family:times new roman,Arial; font-size:25px; color:#FFFFFF; } h1 { font-family:times new roman,Arial; font-size:100px; color:#FFFFFF; } And it works but it puts the same image on every html page I have and I get this. But what if I want say one image called leaf.jpg just to be used as the background on just the fall.html page??Just add this to the head of your page, "fall.html". Code: [Select]<style type="text/css"> body { background-image: url(leaf.jpg); } </style> OK so if I ad body { background-image: url(leaf.jpg); } to the Head Tag I get how this works. Then how is this diferant or batter then if I just added an HTML to the page you know the code that was used with HTML? Or if I stick with body { background-image: url(leaf.jpg); } It is faster to load??http://www.quackit.com/html/codes/html_background_image_codes.cfm Stick with CSS.You could use either inline or embedded styles in this case but I think embedded, as kpac suggested, is the BETTER choice in this case. Reference on Types of CSS Styles (inline, embedded, external): http://webdesign.about.com/od/css/qt/aatypesofcss.htmSoory what I ment to say is Thanks for the help. So if I put the CSS code in the Header Tags for the background image or if I use HTML code Witch is batter or what will hapen? If I use the old will it do something to the page because the rest of it is in CSS??? Or if I use CSS in the head tags to place the background image it will load faster??? What is going onI answered that. Quote from: kpac on April 16, 2010, 02:00:02 PM http://www.quackit.com/html/codes/html_background_image_codes.cfmQuote from: nymph4 on April 17, 2010, 11:58:15 AM If I use the old <BODY BACKGROUND="Leaf A1.JPG"> will it do something to the page because the rest of it is in CSS???Yes, it will display the background image in the page. But, as the reference cited by kpac says, "This is the old way of specifying a background image in HTML, and is now deprecated (outdated and not recommended) by the W3C. Instead of using this method, you should use the CSS method ..." Quote from: nymph4 on April 17, 2010, 11:58:15 AM Or if I use CSS in the head tags to place the background image it will load faster???No, but see above quote from the reference."Or if I use CSS in the head tags to place the background image it will load faster???" -> you mean , right? I don't know, let's ask the people here. As far as I see it, no one has yet said if the page will load faster as opposed to an external CSS file. I would say that the internal style (head) is faster because it doesn't have to go search for an external file. I might be WRONG though. Quote I would say that the internal style (head) is faster because it doesn't have to go search for an external file. I might be wrong though.You're not wrong. But if the CSS file is DOWNLOADED externally once, the browser will store it in the cache so it doesn't need to download it again.Then the question is: if stored in the cache, is it faster than inline style (head)? |
|