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? Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.