SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    Non-Member hyperimage's Avatar
    Join Date
    Dec 2003
    Location
    Croatia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    php and css question

    hi!
    a short question!!!
    is there a way to introduce a php hypertext into css???
    like
    Code:
    body {
    font-size: $font-size;
    }
    suggestions?
    thanx in advance!

  2. #2

    Join Date
    Oct 2003
    Location
    €uroLand
    Posts
    1,340
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HTML Code:
    body {
    font-size: <?php echo $font-size?>;
    }

  3. #3
    Non-Member hyperimage's Avatar
    Join Date
    Dec 2003
    Location
    Croatia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    really!!!!!
    im a stupid moron!!!!!!
    what i have done to avoid this couse i havent know about this lol!!!!
    stupid me!!!!!
    thanx drzoid!!!!!!!!

  4. #4
    Non-Member hyperimage's Avatar
    Join Date
    Dec 2003
    Location
    Croatia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    last question about this problem!
    where i have to put the mysql form "select * from db....
    into the css file or into the file that call css?
    thanx in advance!!!

  5. #5

    Join Date
    Oct 2003
    Location
    €uroLand
    Posts
    1,340
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As it is PHP code you need to add it into your HTML file.

  6. #6
    Non-Member hyperimage's Avatar
    Join Date
    Dec 2003
    Location
    Croatia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you very much!!!
    u help me a lot man!
    thanx again!

  7. #7
    Non-Member hyperimage's Avatar
    Join Date
    Dec 2003
    Location
    Croatia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is that ok?
    Code:
    BODY  {
    	font-family : <?=$row['7']?>;
    	font-size : <?=$row['9']?>;
    	background : <?=$row['6']?>;
    	color : <?=$row['8']?>;
            background-image: url(<?=$xpath.'/'.$row['5']?>);
    }

  8. #8

    Join Date
    Oct 2003
    Location
    €uroLand
    Posts
    1,340
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If the variables are properly set, then yes. It depends on its context. Just give it a try.


Bookmarks

Posting Permissions

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