sharma.atul85 Posted June 29, 2009 Share Posted June 29, 2009 hi all .. am working on a project where I need to add different background to the heading to infoboxes . can u please suggest how to do that ?? I have an idea that it has something to do with boxes.php class in classes folder but its not going the right way.. Link to comment Share on other sites More sharing options...
masat Posted June 29, 2009 Share Posted June 29, 2009 You are right -> if you look in includes/classes/boxes.php Here is what I did for example... extend class box class infoBoxDiffBgrnd extends tableBox { function infoBox($contents) { $info_box_contents = array(); $info_box_contents[] = array('text' => $this->infoBoxContents($contents)); $this->table_cellpadding = '1'; $this->table_parameters = 'class="infoBoxDiffBgrnd"'; $this->tableBox($info_box_contents, true); } Use the class="infoBoxDiffBgrnd" to set your background. Now you could add a variable to function infoBox($contents, $diff_bgrnd) { ....... and change $this->table_parameters = 'class="' . $diff_bgrnd . '"'; now would be more flexible and could be controlled from css. Good Luck How do you know when you know what you want to do for the rest of your life? Link to comment Share on other sites More sharing options...
sharma.atul85 Posted June 30, 2009 Author Share Posted June 30, 2009 ok well this is for background of infoboxes but I have to change the background of heading ..please suggest .. Link to comment Share on other sites More sharing options...
♥ecartz Posted June 30, 2009 Share Posted June 30, 2009 If you want all the boxes to change, you could simply change images/infobox/corner_left.gif, images/infobox/corner_right_left.gif, images/infobox/corner_right_left.gif, and the styles for CSS class infoBoxHeading. If you need help with CSS, you might want to try a CSS tutorial. I like the one on W3 Schools, but there are a number of them on the net. If you are trying something and it's not working, you will usually get better help if you explain what you tried, what you expected to happen, and what actually did happen (preferably with a site link). It's entirely possible to change the headings without touching the boxes class. If you just want them to be a different color or to use an image in the background, you could do that entirely by changing the CSS styles and the three images I mentioned. Always back up before making changes. Link to comment Share on other sites More sharing options...
sharma.atul85 Posted June 30, 2009 Author Share Posted June 30, 2009 ya sure I have done it earlier too(to change background image of all infoboxes heading) but this time I need to change background image of the heading of infoboxes. Like different 1.png image for catetgories header and 2.png for information box Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.