Generate headlines
To generate the headline styles for H1 – H6 you can use a loop:
1 2 3 4 5 |
@for $i from 1 through 6 { h#{$i} { font-size: 2.5em - (0.2em * $i); } } |
To generate the headline styles for H1 – H6 you can use a loop:
1 2 3 4 5 |
@for $i from 1 through 6 { h#{$i} { font-size: 2.5em - (0.2em * $i); } } |
To add JavaScript or CSS files to the head section of the resulting HTML page, you can add something like this to the _prepareLayout function of a Block class:
1 2 3 |
$headBlock = $this->getLayout()->getBlock('head'); $headBlock->addJs('somefolder/ask-sheldon.js'); $headBlock->addCss('somefolder/ask-sheldon.css'); |
As you can see, we can use the layout model to get the head block an use its functions to add files. This doesn’t work inside of […]
You can use this CSS for styling quotes:
1 2 3 4 5 6 7 8 9 10 |
blockquote { background: url(quote_top.gif) top no-repeat; width: 168px; float: right; } blockquote p { background: url(quote_bottom.gif) bottom no-repeat; padding: 20px 15px; font-size: 10px; } |
Blockquote_demo contains a short example.