Home Tutorial Php Zendframework ZF Decorate With CSS

 
 

ZF Decorate With CSS
Posted on: April 26, 2010 at 12:00 AM
It is obvious that we need some CSS to change the regular look of a web page, we will create and use in our current tutorial....

Now Decorate it with CSS:

It is obvious that we need some CSS to change the regular look of a web page, nonetheless, we will create and use in our current tutorial. First of all create a folder called css in public folder and create a file called site.css inside the css folder (public->css->site.css), now copy and paste the following code inside the css file, you can change it to your own style:

body,html {

margin: 0 5px;

font-family: Verdana,sans-serif;

}

h1 {

font-size: 1.4em;

color: fuchsia;

}

a {

color: gray;

}

Now add the following line inside the head tag in layout.phtml file:

<?php echo $this->headLink()->prependStylesheet($this->baseUrl().'/css/site.css');?>

Visit index page and other pages you will see the changes as below:

index-layout

Like the above every page will follow the same style:

redirect-layout

Related Tags for ZF Decorate With CSS:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.