Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-06-2011, 01:46 AM   PM User | #1
johnybgood
New to the CF scene

 
Join Date: Feb 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
johnybgood is an unknown quantity at this point
Firefox not displaying image - Joomla

Hi there,

I customized the content module so the title of an article displays an image before the text and the text is displayed with two colors!!

The relevant part of the code is at follows:
Code:
<h2 class="title">
			<?php if ($params->get('link_titles') && !empty($this->item->readmore_link)) : ?>
			<a href="<?php echo $this->item->readmore_link; ?>">
				<div><span class="image-title"></span>
				<?php 
				$titles = explode(" ",$this->item->title);
 
					for ($i=0; $i<count($titles)-1; $i++){
						echo '<div style="float:left;padding-left:7px;color:#303030;">'.$this->escape($titles[$i]).'</div>';
 
					}?> 
					<div style="color:#06cfef;float:left;padding-left:7px;"><?php echo $this->escape($titles[$i]);?></div></div></a>
					<div style="clear:both;height:0px;"></div>
			<?php else : ?>
				<div><span class="image-title"></span>
				<?php
					$titles = explode(" ",$this->item->title);
					for ($i=0; $i<count($titles)-1; $i++){
						echo '<div style="float:left;padding-left:7px;">'.$this->escape($titles[$i]).'</div>';
 
					}?> 
					<div style="color:#06cfef;float:left;padding-left:7px;"><?php echo $this->escape($titles[$i]);?></div></div>
					<div style="clear:both;"></div>
			<?php endif; ?>
		</h2>
In both IE and Google Chrome everything is displayed as wanted (apart from ie which has some positioning problem but i'm not focusing on that now)

In firefox, I can see the content loading correctly but just before the page finish loading the image disappears... I just can't understand why!!

You can take a look at this url: http://sostudent.com/joomla/

Can anyone please help??

Thanks
johnybgood is offline   Reply With Quote
Old 06-06-2011, 09:25 AM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,678
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Code:
<h2 class="title">
<a href="/joomla/">
				<div><span class="image-title"></span>
				<div style="float:left;padding-left:7px;color:#303030;">Business</div> 
					<div style="color:#06cfef;float:left;padding-left:7px;">ABC</div></div>
</a>

					<div style="clear:both;height:0px;"></div>
					</h2>
That's clearly an invalid markup, as you can't nest a block level element like <div> inside an inline element like <a>.

See http://validator.w3.org/check?verbos...om%2Fjoomla%2F
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Reply

Bookmarks

Tags
css, firefox, joomla

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:25 PM.


Advertisement
Log in to turn off these ads.