A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

Javk

  • one year ago

Can somebody help me with php? I have a css file and I would like to use those styles in the php code...is that possible?

  • This Question is Closed
  1. e.mccormick
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 2

    When you output web pages with PHP, you basically print the HTML to the web port. I see no reason why including CSS as yet more output would be a problem. A little research shows people doing a lot with it: http://stackoverflow.com/questions/13201451/how-to-use-css-style-in-php https://css-tricks.com/css-variables-with-php/ http://code.tutsplus.com/articles/supercharge-your-css-with-php-under-the-hood--net-6409

  2. woodrow73
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Wow that css embedded in a php page, and referenced by the html page with a <link rel="stylesheet" href="page.php" media="screen"> is really cool Nice examples

  3. woodrow73
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    But ya.. looks pretty easy to put css in the file.. either using echo "//css" or simply ending the php tag ?>, then putting your html/css like you normally would - then you can place more php tags as you need them.. I think

  4. e.mccormick
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 2

    Yep. The issue is escaping things to have the right number of \ in there, and things like that, which is the sae issue with PHP to HTML.

  5. Javk
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Thankyou, I got it. I'm working on a project and wasn't looking at all the files...it really was rather silly...I failed to look at the php file that contained the functions that defined what was going to be output to the html file.

  6. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.