How to use css script on each page ??

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
Look, PHP is very advanced for someone just learning.
You should really learn (X)HTML, CSS and JavaScript before you try PHP.

Ignore PHP for now, and concentrate on HTML and CSS until you've learned those, and then move on to JavaScript.
 

DrEvil

FCRI Associate!
Reaction score
111
Oki Doki ..

I'l come back in a few hours then ^^ ( Joking people :) )

Thanks for all the help though , at least I've learnt about css files and how to use them.
 

UndeadDragon

Super Moderator
Reaction score
447
To be honest, I wouldn't count PHP include() as learning PHP. It is just a function that speeds things up and PHP isn't half as advanced as you are making it seem.
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
No, but it's very advanced for someone just learning the basics of HTML and CSS.
 

UndeadDragon

Super Moderator
Reaction score
447
Oh yes, good point ;)

Although DrEvil may still find it easier to use include() rather than typing it out everytime. I used include() before I started to learn PHP variables :p
 

Rainther

I guess I should write something of value here...
Reaction score
61
What's most advanced? include(file)

or something like document.write, open etc. in Java Script? :p

In my opion php is really basic and easy to understand. Just remember to end each "sentence" with a ;
 

codemonkey

Code monkey not crazy, just proud.
Reaction score
66
I don't mean to toot my horn but check out my Basics of CSS.

>Just remember to end each "sentence" with a ;

Statement

>What's most advanced? include(file)

I almost fell off my chair laughing
 

JerseyFoo

1/g = g-1
Reaction score
40
Lawl. Would just like to point out this is why CSS exists.

When tags like <font> and color attributes were added to the HTML 3.2 specification, it started a nightmare for web developers. Development of large web sites where fonts and color information had to be added to every single Web page, became a long, expensive and unduly painful process.
source
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
Yeah, making pages was a freaken pain in the ass until I discovered CSS. Then it actually started to get fun.
 

Rainther

I guess I should write something of value here...
Reaction score
61
I think you got me wrong, I didn't mean that php's include is hardiest thing to learn in php.

And CSS is a blessing from above indeed.
 

codemonkey

Code monkey not crazy, just proud.
Reaction score
66
To be honest, I wouldn't count PHP include() as learning PHP. It is just a function that speeds things up and PHP isn't half as advanced as you are making it seem.

Actually the include() function will slow page generation time, not speed it up.
 

UndeadDragon

Super Moderator
Reaction score
447
Actually the include() function will slow page generation time, not speed it up.

It would be barely noticeable, though. And it would not need as much typing of the same thing, which is preferred by a lot of people.
 

codemonkey

Code monkey not crazy, just proud.
Reaction score
66
It would be better to cache the pages, instead of running the PHP script every single time.
 

codemonkey

Code monkey not crazy, just proud.
Reaction score
66
Store the pages somewhere, like in a SQL database, then put it together and write to the file.
 

DrEvil

FCRI Associate!
Reaction score
111
...I have small knowledge of HTML like I know how to even use a database XD
 

UndeadDragon

Super Moderator
Reaction score
447
Hm... I think that I would prefer to use include() for the actual design and then SQL for the content, rather than SQL for everything.
 

ertaboy356b

Old School Gamer
Reaction score
86
Is this done??

I have some steps :)

1. Open notepad.
2. Do your CSS code like you normally do..
3. After your done with the css code, save your file. Click All files before you save and type in the file name "NameOfYourFile.css".
4. Now open notepad again and write your html code. Save it as a .html
5. Place your html file into the same directory as the .css file.
6. Now open your html file in notepad. Just between the <head></head> section, type <link href="NameOfYourFile.css" type="text/css" rel="stylesheet" />. This code will integrate your css file into the html.

CSS Usage Example:

Code:
p {
color: blue;
font-size: 36px;
}

HTML Integration:

Code:
<html>
<head>
<title>Sample</title>

<link href="NameOfYourFile.css" type="text/css" rel="stylesheet" />

</head>
<body>

<p>This text is modified via CSS. The color of this text is blue and the font-size of this text is 36px.</p>

</body>
</html>
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top