World is Welcome To The World of Linux

Journey into the world of linux

Menu
  • About
  • Welcome
Menu

Useful Hints For Using CSS in PHP(Specially For Joomla)

Posted on May 25, 2010 by Ganesh Sharma

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

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.

Good Luck!!!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Date Command Tutorial(Video)
  • grep Command Tutorial – 1(Video)
  • Introduction To ls Command(Video)
  • Chapter 3
  • Set Position Of Poll Module Into Joomla

Recent Comments

  • Kansas City Trailer Proz on Physical Volume In AIX – A Primer
  • Create volume group in AIX | myunixsheet on How To Create Volume Group
  • Restore of AIX backup on other Unix system - TecHub on What is mksysb And What Are Its Components
  • Firewall Unleashed - InfoSec Institute on Packet Filtering Firewall: An Introduction
  • Manwendra on Proxy Firewall and Gateway Firewall: Introduction

Archives

  • January 2019
  • June 2010
  • May 2010
  • February 2010
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008

Categories

  • 30 Days To Joomla WebSite Setup
  • A Journey To The World of Linux System Administration
  • Aix
  • Backups
  • Books
  • Firewalls
  • Introduction
  • Joomla
  • Joomla Backup
  • Joomla Web Technology
  • Linux
  • LPAR and Virtualization
  • LVM
  • Pluggable Authentication Modules
  • section navigator pro
  • Security
  • Security Knowledge Base
  • Tips and Tricks
  • Uncategorized
  • World is Welcome Products

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
©2023 World is Welcome To The World of Linux | WordPress Theme by SuperbThemes