carlosx2 Posted October 7, 2009 Share Posted October 7, 2009 ok this is driving me crazy. Its all so simple with html. but php. I try to link my php page to my css page for styling but for some reason i am only getting error. what kind of link do i use and where do i place it and can just style like ith id= or class=? i have a page thats just <?php ?> and nothing more. well the code in between but no html tags or anything. its going to be included into another php page. How do i do this. Link to comment https://forums.phpfreaks.com/topic/176845-css-styling/ Share on other sites More sharing options...
carlosx2 Posted October 7, 2009 Author Share Posted October 7, 2009 any one who can help me here? Link to comment https://forums.phpfreaks.com/topic/176845-css-styling/#findComment-932468 Share on other sites More sharing options...
jcombs_31 Posted October 7, 2009 Share Posted October 7, 2009 Your question doesn't really make any sense. You want to style an empty page? You add your link in the head of your document, just like you would with an html page. Link to comment https://forums.phpfreaks.com/topic/176845-css-styling/#findComment-932475 Share on other sites More sharing options...
Warz Posted October 7, 2009 Share Posted October 7, 2009 If there are no css tags you will have to do styling by the tags php has to offer.. or you can edit the php code. Try first line after <?php to add: echo '<link href="http://UrlToYourCssFiles.com/style.css" rel="stylesheet" type="text/css"> '; Then you can use that css file to style your page. Link to comment https://forums.phpfreaks.com/topic/176845-css-styling/#findComment-932478 Share on other sites More sharing options...
carlosx2 Posted October 7, 2009 Author Share Posted October 7, 2009 its not an empty page. i just try to tell that it is a pure php page. so no html header tags or body tags. just php Link to comment https://forums.phpfreaks.com/topic/176845-css-styling/#findComment-932479 Share on other sites More sharing options...
carlosx2 Posted October 7, 2009 Author Share Posted October 7, 2009 thanks. i get it. i didn't knew you had to use echo. thanks Link to comment https://forums.phpfreaks.com/topic/176845-css-styling/#findComment-932481 Share on other sites More sharing options...
jcombs_31 Posted October 7, 2009 Share Posted October 7, 2009 A "pure php page" should still be rendered with correct html markup. You can easily add you doctype and head section before your first <?php tag. Link to comment https://forums.phpfreaks.com/topic/176845-css-styling/#findComment-932509 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.