Share on Google+Share on Google+

ZF Decorate With CSS

Advertisement
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

Advertisements

Posted on: April 26, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.