Recently we were working on some joomla component. But when we setup css divisions, the result page was getting blank instead of showing the css effects.
Just for those who may find similar problems, I am writing the article. I hope it may serve the people in need.
When we set the css for the web page it was not display the data , it was showing the blank page.
The name of the division for css was “hostels_search_form”.
I was applying css style in the division with the following code:
echo "<div class=\"hostels_search_form\">"; some code, blah....blah...blah... echo "</div>";
Though syntactically the code seems to be alright, but still it was giving us problem.
The solution was to take the “div” element out of the echo statement.
The solution I applied for that was:
//Close the previous php block. ?> <div class=\"hostels_search_form\"> <?php some code, blah...blah...blah... ?>
As soon as I finished this, the code was working absolutely fine.
Normally, the rule of thumb is, if you want to setup any div element for css styling, and the css class/id contain some “-“(Hiphen) or “_”(Underscore),
we should bring it out of echo statement.
You should have absolutely no problem.