Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Jun 2008
    Location
    Jupiter
    Posts
    49
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Mixing Css with Php

    Any other way to do this without using inline styles? When i try using embedded styles, it messes up my php. Any online tutorial that gives insights about mixing php and css? Thanks.

    Tokio

  • #2
    Senior Coder Len Whistler's Avatar
    Join Date
    Jul 2002
    Location
    Vancouver, BC Canada
    Posts
    1,323
    Thanks
    26
    Thanked 100 Times in 100 Posts
    Quote Originally Posted by tokio View Post
    Any other way to do this without using inline styles? When i try using embedded styles, it messes up my php. Any online tutorial that gives insights about mixing php and css? Thanks.

    Tokio
    I prefer external CSS files. My guess the inline isn't working is because you are not escaping some characters with the back slash.


    ----
    Leonard Whistler

  • #3
    New Coder
    Join Date
    Dec 2008
    Location
    India
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Use this in head tag
    <link rel="stylesheet" type="text/css" href="theme.css" />
    Regards
    InnovateWebs
    "Committed to Quality "
    http://www.innovatewebs.com

  • #4
    New Coder
    Join Date
    Jun 2008
    Location
    Jupiter
    Posts
    49
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Len Whistler View Post
    I prefer external CSS files. My guess the inline isn't working is because you are not escaping some characters with the back slash.


    ----
    Ah, for some reason i thought that external styles couldn't be used with php because alot of examples of code that i've seen online either used inline or embedded styles. Thanks for that. Out of curiosity, can you provide a link to a site that talks about using escaped characters with php/css. Thanks.

    Tokio

  • #5
    New Coder
    Join Date
    Jun 2008
    Location
    Jupiter
    Posts
    49
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by innovatewebs View Post
    Use this in head tag
    <link rel="stylesheet" type="text/css" href="theme.css" />

    I think an extrenal style link would look like this:

    <link =rel="stylesheet" media="screen" type="text/css" href="theme.css" />

    Pretty much the same thing you have, except you forgot to specify the media style.

    Tokio

  • #6
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,801
    Thanks
    160
    Thanked 2,216 Times in 2,203 Posts
    Blog Entries
    1
    Any other way to do this without using inline styles? When i try using embedded styles, it messes up my php. Any online tutorial that gives insights about mixing php and css? Thanks.
    Could you be a little more specific by providing your current code? I don't understand how a style could mess your PHP.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •