Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 1, 2026.

Css help

SpaceshipSpaceship
Spacemail by SpaceshipSpacemail by Spaceship
SpaceshipSpaceship
Watch

apower

Established Member
Impact
1
what is a php code needed to include a css file within a php file?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Put this code between the head tags.

Code:
<link type="text/css" rel="stylesheet" href="css/style.css" />

The above code assumes there is a folder called "css" in the same directory as the php file and inside that css folder there is a file called "style.css"

If it doesn't work try a full URL like this:
Code:
<link type="text/css" rel="stylesheet" href="http://www.example.com/css/style.css" />

notes:
1. There is no difference between linking from an html file to a css file or linking from a php file to a css file.
2. An external css file is a completely blank file. CSS files don't have header sections or other sections like html files. You can create a style.css file with notepad.
3. On page css code looks like this:
(between the head tags)
Code:
<style type="text/css">
<!--
#wrapper {
	padding: 20px;
}
-->
</style>

If the same code was to be moved to an external css file, we would only put this on the file:
Code:
#wrapper {
	padding: 20px;
}

Do you need any more help with css?
 
1
•••
CatchedCatched

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back