Trouble with php syntax for if-loops with css -


i'm not coder, techniques include copy pasting , editing until works.

i have code in index.php joomla 2.5 site, outputs css style on homepage.

<?php $app = jfactory::getapplication(); $menu = $app->getmenu(); ?> <?php if ($menu->getactive() == $menu->getdefault()): ?> <style type="text/css">   #contentonderaan {min-height: 462px;} </style> <?php endif; ?> 

this works ok, want use 'else' statement pages not homepage give alternate min-height css. should easy right? there's wrong syntax because can't work. how should written?

what's not working syntax?

it should else:.

<style type="text/css"> <?php if ($menu->getactive() == $menu->getdefault()): ?>     #contentonderaan {min-height: 462px;} <?php else: ?>     #contentonderaan {min-height: your_heightpx;} <?php endif; ?> </style> 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -