how do you make a style file, please tell me the basics and what are the advantages and disadvantages or having one. Thankyou
you mean create a file with css and use the include function with php so you dont have to copy paste the css in each page?
yeah, I think that is want I want. I have a few templates and they act weird when I do not upload the style thing. What are the pros and cons of using them?
Style sheets even if they are placed in the source code, greatly improve the speed of the loading time since it shorten its size. With an external css a usual filesize can be reduced with almost 50%.
pros its easy if every layout on a page is the same it saves in editing did i mention its easy? make a file called css.php and put whatever your heart desires in it. then on the pages you want it to show up on put this on the top of the page <?php include 'css.php'; ?> PHP: below that you dont need to bother putting in the css because its pulled from the .php file. im assuming your keeping both files in the same directiory if not you need to change whats in the php statement to the directory the css.php file is in hope i clarified. im a noob myself
I just read about it on a different site. It is style.css not style.php. Can you explain how to make a style.css.
hey, just try a simple "hello world" HTML page: <html> <head> <title>hello world</title> </head> <body> <h1>Hello World!</h1> </body> </html> ... and display it in the browser. Good. Now add this to the HEAD section (after TITLE maybe): <style type="text/css"> body {background:silver; color:navy} </style> Save, reload. Do you see the difference? Now try more (into STYLE section): h1 {font-size:40pt; text-decoration:underline; color:#440000} and so on - no fear, just keep experimenting Then, you can save everything whats between STYLE tags into a file (let's say style.css). There won't be a STYLE in the HTML's HEAD section then - you just include the external stylesheet with this LINK tag: <link rel="stylesheet" type="text/css" href="style.css" /> So much for the magic ;-) Good luck!
Thankyou for helping. I will go through your example. I am new to this so please be patient. I am having troubles: Ok, done please explain more carefully. Is there two seperate files? Is there two seperate files? or do I add that code into the hello world document.
Yes, in this moment you are still working/experimenting with one HTML file, with no external CSS file. When you want the CSS definitions "outside" the HTML, then you copy&paste it into a new file, saving it as style.css and LINKing it from the HTML file, like I specified above...