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 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2011
    Posts
    66
    Thanks
    17
    Thanked 0 Times in 0 Posts

    Why doesn't my CSS external sheet work?

    Hello,

    Why won't my CSS sheet work?

    My code "search.php":

    PHP Code:
    <html>
    <title>Wiki</title>
    <head>

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

    </head>

    <body>

    <?php
        
        
    if( ! isset($_POST['submit']))
        {
    ?>

        <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="post">
            Keyword: &nbsp;&nbsp; <input type="text" name="keyword"> &nbsp;&nbsp;&nbsp;&nbsp;
                By &nbsp;&nbsp;
                    <select name="column">
                        
                        <option>question</option>
                        <option>cause</option>
                        <option>condition</option>
                        <option>procedure</option>
                        <option>plm</option>
                        
                    </select>
                    
        <input type="submit" name="submit" value="Search">
        </form>
    </center>

    <?php

        
    }
        
        else
        {
        
        
    $con mysql_connect('localhost','root');
        
    $db mysql_select_db('csr');
        
        
    $sQry 'SELECT * FROM csr';
    $sWhere '';
    if (isset(
    $_POST['column']))

    {
        switch (
    $_POST['column'])
        {
            case 
    'question':
                
    $sWhere .= ' WHERE `question` LIKE';
                break;
            case 
    'cause':
                
    $sWhere .= ' WHERE `cause` LIKE';
                break;
            case 
    'condition':
                
    $sWhere .= ' WHERE `condition` LIKE';
                break;
            case 
    'procedure':
                
    $sWhere .= ' WHERE `procedure` LIKE';
                break;
            case 
    'plm':
                
    $sWhere .= ' WHERE `plm` LIKE';
                break;
        }

        if (!empty(
    $sWhere) && isset($_POST['keyword']))
        {
            if (
    get_magic_quotes_gpc())
            {
                
    $_POST['keyword'] = stripslashes($_POST['keyword']);
            }
            
    $sWhere .= '\'%' mysql_real_escape_string($_POST['keyword']) . '%\'';
        }
        
    $sQry .= $sWhere;
    }  
        
        
        
    $query mysql_query($sQry);
        
        if( ! 
    $query ) {
            echo 
    "Error doing query...";
        }
        if(
    mysql_num_rows($query) > 0) {
        
        echo 
    "Keyword found!<br>";
        echo 
    "Amount of keywords: " mysql_num_rows($query);
        echo 
    "<br><br><br>";
        while (
    $csr mysql_fetch_object($query)){
        echo 
    "<textarea>";
        echo 
    $csr->plm;
        echo 
    "</textarea>";
        echo 
    $csr->id " ";
        }
        }
        else { echo 
    "Keyword not found!" mysql_error(); }
        }
        
    ?>

    </body>

    </html>
    My stylesheet "stylesheet.css":

    PHP Code:
    body
    {
    background-color:#FFFFFF;
    }

    h1 {text-align:center;color:#19199B;font-family:Arial;font-size:50px;}

    hr {color:#19199B;}

    p.content {margin-left:200px;margin-right:200px;color:#19199B;font-family:Arial;font-size:14px;}

    script.time {margin-right:20px;}

    #navbar ul { 
            
    margin0
            
    padding10px
            list-
    style-typenone
            
    text-aligncenter
            
    background-color#19199B; 
            

     
    #navbar ul li {  
            
    displayinline
            } 
     
    #navbar ul li a { 
            
    text-decorationnone
            
    padding.2em 1em
            
    color#fff; 
            
    background-color#19199B; 
            

     
    #navbar ul li a:hover { 
            
    color#000; 
            
    background-color#fff; 
            
    }
            




    body {

    }
    ul.sidemenu {
    padding1;
    margin0;
    list-
    stylenone;
    font-familyArial;
    font-size0.8em;
    border-bottom1px solid #000000;
    width187px;
    background-color#19199B;
    }
    ul.sidemenu li {
    border-top1px solid #FFFFFF;
    border-left1px solid #000000;
    border-right1px solid #000000;
    }
    ul.sidemenu li a {
    text-decorationnone;
    displayblock;
    width165px;
    color#FFFFFF;
    font-weightbold;
    padding2px 10px;
    }
    ul.sidemenu li a:hover {
    background-color#FFFFFF;
    color#19199B;

    Thanks in advance!

  • #2
    New Coder
    Join Date
    Jun 2011
    Posts
    66
    Thanks
    17
    Thanked 0 Times in 0 Posts
    Nevermind I solved it!


  •  

    Posting Permissions

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