huntrguy102 Posted February 10, 2010 Share Posted February 10, 2010 I have a PHP file that pulls information from a database and posts them on the page. I was wondering how I would be able to stylized this page; because as of now it is just a white page with text nothing else. So is there a way to do this? Link to comment https://forums.phpfreaks.com/topic/191634-using-css-to-stylize-a-php-page/ Share on other sites More sharing options...
FaT3oYCG Posted February 10, 2010 Share Posted February 10, 2010 well the PHP will create the html, so add some ID's and Class's to the tags and style them appropriately with CSS. Link to comment https://forums.phpfreaks.com/topic/191634-using-css-to-stylize-a-php-page/#findComment-1010199 Share on other sites More sharing options...
huntrguy102 Posted February 10, 2010 Author Share Posted February 10, 2010 ok that helps sort of. What I don't get (Im a noob) is, what tags do you mean. Like I know what tags are in html. But there is no HTML on the php page. Link to comment https://forums.phpfreaks.com/topic/191634-using-css-to-stylize-a-php-page/#findComment-1010331 Share on other sites More sharing options...
Orionsbelter Posted February 10, 2010 Share Posted February 10, 2010 Could you post your code so we can see what your working with. Link to comment https://forums.phpfreaks.com/topic/191634-using-css-to-stylize-a-php-page/#findComment-1010344 Share on other sites More sharing options...
haku Posted February 11, 2010 Share Posted February 11, 2010 CSS doesn't interact with PHP at all. PHP is logic, it isn't actually anything that can be acted on. However, PHP outputs HTML (or rather can output HTML if that's what you tell it to do), and CSS acts on the HTML. Kind of like this: PHP -> HTML <- CSS So you want to write a PHP script that outputs the HTML that you want. Then you set up your CSS the same way you would for an HTML document that is not generated by PHP. CSS doesn't care how the HTML was generated, it just needs that HTML. So run your PHP script, and look at the output. If it's not HTML, you can't use CSS. If it is HTML, then make your PHP script output the HTML the way you want with ID and CLASS attributes, and use your CSS as always. Link to comment https://forums.phpfreaks.com/topic/191634-using-css-to-stylize-a-php-page/#findComment-1010494 Share on other sites More sharing options...
huntrguy102 Posted February 12, 2010 Author Share Posted February 12, 2010 thank you haku thats all I needed to know Link to comment https://forums.phpfreaks.com/topic/191634-using-css-to-stylize-a-php-page/#findComment-1011390 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.