php output probelm
Hello peoples, I'm beginner in web programming. Just started with HTML + CSS. But, struggling a lot. Plz can any body help me out from this.



Here is my codes...




<html>
<
head>
  <
title>Hello!</title><style type="text/css">
/*<![CDATA[*/
          
body {
width:900px;
margin:10px;
font-size:80%;
font-family:'Lucida Grande',Verdana,sans-serif;
  .
header{width:150px;
          
cellpadding:10px
          backgroundcolor
:green;
          
border:1px solid #ccc;
          
}
    .
main page{   width:600px;

          
cellpadding:10px;
          
backgroundcolor:black;
          
border:1px solid #ccc;

      
}
      .
footerwidth:100px;
          
cellpadding:10px;
          
backgroundcolor:red;
          
border:1px solid #ccc;
        
}
      }

    }

/*]]>*/
</style>

</
head>

<
body>

<?php
echo("Hello, World!" );
?>
<div class="header">
<
h1>........welcome to juice and bar......</h1>
</
div>
    <
div class="main page" >
    </
div>
<
div class="footer">
</
div>


</
body>

</
html





My HTML code are wrking fine but, CSS is not working properly as it should be. Plz, any body can help me...



Thanks in advance :)

28th Mar 2011 at 10:41 PM   1422 Views

Hey Dude, first of all welcome at here. BDW, in your CSS u've done many wrong things. Here is the right code...

<style type="text/css">
/*<![CDATA[*/
   
body {
  
width:900px;
  
margin:10px;
  
font-size:80%; 
  
border0px solid #ccc;
  
font-family:'Lucida Grande',Verdana,sans-serif
 }
  
 
 .
header{
  
width:550px;             
  
backgroundgreen;
  
border1px solid red;
 }
 
   .
mainpage{   
    
width:600px;
  
backgroundwhite;
  
border:0px solid #ccc;
      
}
      
 .
footer
  
width:300px;
  
background:red;
  
border:0px solid #ccc;
 
}

/*]]>*/
</style


What you was doing wrong
* "font-family:'Lucida Grande',Verdana,sans-serif;" This should be inside any division.
* "backgroundcolor:green;" it should be "background-color:green" or "background: green"
* "cellpadding:10px;" Place for this thing is HTML table. This is not a CSS property for any division.
* At couple of places you'd forgot to give comma after placing CSS property.

So Madhu, this much the things. If u want, just copy & paste my given CSS codes in u'r code & execute it. You can see d difference... :)
29th Mar 2011 at 12:51 AM