View Full Version : Css
lev20
16-06-2009, 08:59 AM
How is Inline, header and external CSS called to the page?
Naphta
16-06-2009, 09:02 AM
<link href="css/main.css" rel="stylesheet" type="text/css">If thats what you mean, just change the bold and underlined for your css files paths
To include files just use php with
<?php
include('pie.php')
?>
I do feel i'm barking up the wrong tree here though.
Darker X
16-06-2009, 09:21 AM
<html>
<head>
<title>This is My Page</title>
<link href="css/main.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="header">
<p>Header Content i.e. Logo etc goes here</p>
<div id="nav">
<a href="firstpage.html">First Page</a>
<a href="secondpage.html">Second Page</a>
</div>
</div>
<div id="mainbody">
<p>Main Content goes here</p>
</div>
</body>
</html>
The div id="#" tags are what you use to class the style/format that you have defined in your main.css file, alternatively div class="#" can be used but only for font and small style changes outside of a div id="#" tag.
It is linked to the page using <link href="css/main.css" rel="stylesheet" type="text/css">
Naphta
16-06-2009, 10:00 AM
<html>
<head>
<title>This is My Page</title>
<link href="css/main.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="header">
<p>Header Content i.e. Logo etc goes here</p>
<div id="nav">
<a href="firstpage.html">First Page</a>
<a href="secondpage.html">Second Page</a>
</div>
</div>
<div id="mainbody">
<p>Main Content goes here</p>
</div>
</body>
</html>
The div id="#" tags are what you use to class the style/format that you have defined in your main.css file, alternatively div class="#" can be used but only for font and small style changes outside of a div id="#" tag.
It is linked to the page using <link href="css/main.css" rel="stylesheet" type="text/css">
Hehe, at least one of us understood it! OR did you just write all the things to elimate all possible answers?
jonbanjo
16-06-2009, 10:50 AM
To include files just use php with
<?php
include('pie.php')
?>
Without php, you can try
<!--#include virtual="file.inc" -->
With php, I use require() instead of include(). The difference is require() halts with a fatal error and include() generates a warning and continues. I can't think off hand of a situation where I'd want a page to continue if an include file was missing.
Darker X
16-06-2009, 04:57 PM
Hehe, at least one of us understood it! OR did you just write all the things to elimate all possible answers?
lol a bit of both - basically if you do that it would work lol
@Jon - I use require() for login verfication etc and include()/include_once() only in while or if statements but always with an else statement to fix any warnings etc without it just continuing on etc
i have actually never used or seen <!--#include virtual="file.inc" --> used in any of my web projects lol - if it was just html that i was coding then i might consider iFrames to link in extra files etc
blondeandy
03-08-2009, 09:44 AM
Not iFrames! They make people cry! lol
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.