|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
how do i insert a css file into a php file ?!?
EDIT : Also i would like to know how to set the background colour ?!? |
|
#2
|
||||
|
||||
|
There are thousand of tutorials on how to do this. Google first, unless you are experiencing a particular problem, in which case we should be able to help you out.
|
|
#3
|
|||
|
|||
|
ok, i have searched google and the only things i have found are drop downboxes, all i want is to know how to insert a css sheet into a php file, please help me
|
|
#4
|
||||
|
||||
|
You need more than google, actually. This is a basic CSS/HTML question (you include a CSS file into PHP the same way you would HTML. If you don't know the answer to something as fundamental as this, you really need to start with a very basic tutorial that'll get you up to speed on basic concepts in Web work. I propose devguru.com as a superb starting point. You'll find the answer to your question on the first page of their CSS tutorial. You'll also find out there how to add a background.
__________________
Please don't PM me asking for solutions outside the scope of a thread. Keeping all responses in a thread stands to help others who come along later, which is after all what this forum's all about. |
|
#5
|
||||
|
||||
|
|
|
#6
|
|||
|
|||
|
You can start by adding this line to your html portion of your php file:
<head> ...... <link type="text/css" rel="stylesheet" href="test_css.css" /> ..... </head> Nathan Hall URL 8Networks, Inc. __________________ Network and information systems design, service, and management. |
|
#7
|
|||
|
|||
|
Same kind of prob????
I include my CSS file in a function that creates a header for every HTML page. All was working fine it reformatting the text changing the colour. But knoow it has just stopped changing the size of the text, which is seriously mucking up the layout.
function do_html_header($title = '') { global $total_price; global $items; if(!$items) $items = "0"; if(!$total_price) $total_price = "0.00"; ?> <html> <head> <title><?=$title?></title> <link rel="STYLESHEET" type="text/css" href="style1.css"> </head> <body>3 <table width=100% border=0 cellspacing = 0> <tr> <td rowspan = 2> <a href = "main.php"><img src="images/shack_title.jpg" alt="DVD Shack" border=0 align=left height = 90 width = 400></a> </td> <td height="44" align = right valign = bottom> <? echo "Total Items = $items"; ?> </td> <td align = right rowspan = 2 width = 75> <? display_button("show_cart.php", "view_cart", "View Your Shopping Cart"); ?> </tr> <tr> <td align = right valign = top> <? echo "Total Price = $".number_format($total_price,2); ?> </td> </tr> </table> <? if($title) do_html_heading($title); } I have looked at all the examples on this site and many more but I still can't find a solution to this problem. Anyone no why it would stop reformating the text size?????? Many Thanks Ernie. |
|
#8
|
||||
|
||||
|
Is the style sheet appling it's styles to other parts of the page? If so, then you just have a problem with one of your rules. If it isn't, then there's a problem with the linking of the stylehsheet.
Have you got a URL to the page in question? |
|
#9
|
||||
|
||||
|
Could you be SPECIFIC on your problem?
__________________
Work to live, don't live to work |
![]() |
| Viewing: Dev Articles Community Forums > Web Design > Advanced Web Development > Css + Php ?!? Help Me |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|