/    Sign up×
Community /Pin to ProfileBookmark

Latest Threads Display: IE and Firefox not playing fair!

Hi everyone,

This is a page from the website I am working on: [URL=”http://www.media-live.co.uk/index2.php/links/”]Linkage[/URL]

If you’re viewing that in Opera, you should see the latest forum section display exactly the same as the latest blogs section. This is how it’s supposed to be. However, in Firefox and IE, the latest threads bit displays incorrectly! In Firefox, there are big gaps, and in IE the background colour hover isn’t working right.

Here is the CSS and code for the blogs:

[QUOTE=CSS BLOGS]

#blogs { float: right; margin-right: 15px; margin-top: 15px; width: 250px; height: auto; no-repeat #e9e9e9; background: url(images/blogsbg.jpg) no-repeat #e9e9e9; border: 1px ridge #666666;}

#blogs p { font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #990000; margin-top: 5px; margin-bottom: 5px; text-align: center;}

#blogs h1 { font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #990000; padding-top: 5px; padding-bottom: 5px; text-align: center; background: url(images/titlebg.gif) repeat-x #cccccc; border-bottom: 1px ridge #666666}

#blogs a { font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #0033CC; margin-top: 5px; margin-bottom: 5px; padding-top: 3px; padding-bottom: 3px; text-align: center; text-decoration:none; display:block; margin-left: 10px; margin-right: 10px;}

#blogs a:hover { color: #FFFFFF; margin-top: 5px; margin-bottom: 5px; text-align: center; text-decoration:none; background: #999999;}

[/QUOTE]

[CODE]<div id=”blogs”><h1><strong>..:: LATEST BLOGS ::..</strong></h1>
<?php $temp_query = $wp_query; ?>
<?php query_posts(‘showposts=5’); ?>

<?php while (have_posts()) : the_post(); ?>
<div id=”post-<?php the_ID(); ?>”>
<p> <a href=”<?php the_permalink() ?>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><strong><?php the_title(); ?></strong><br/><?php the_author() ?> on <?php the_time(‘F jS’) ?></a></p>

</div>[/CODE]

Here is the CSS and code for the latest threads:

[QUOTE=CSS Threads]

#minibox2 { float: right; margin-right: 15px; margin-top: 15px; width: 250px; height: auto; background: url(images/ltbg.jpg) no-repeat #e9e9e9; border: 1px ridge #666666;}

#minibox2 p { font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #990000; text-align: center; margin:0px;}

#minibox2 h1 { font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #990000; padding-top: 5px; padding-bottom: 5px; text-align: center; background: url(images/titlebg.gif) repeat-x #cccccc; border-bottom: 1px ridge #666666}

#minibox2 a { font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #0033CC; margin-top: 5px; margin-bottom: 5px; padding-top: 3px; padding-bottom: 3px; text-align: center; text-decoration:none; margin-left: 10px; margin-right: 10px; display: block;}

#minibox2 a:hover { color: #FFFFFF; text-align: center; margin-top: 5px; margin-bottom: 5px; text-decoration:none; background: #999999;}

[/QUOTE]

[CODE]<div id=”minibox2″>
<h1><strong>..:: LATEST FORUM THREADS ::..</strong></h1>

<script type=”text/javascript” src=”http://www.media-live.co.uk/forums/external.php?type=js”></script>
<script language=”” type=”text/javascript”>
<!–
for (x = 0; x < 5; x++)
{
document.writeln(“<strong><a href=”http://www.media-live.co.uk/forums/showthread.php?t=”+threads[x].threadid+””>”+threads[x].title+”</strong><br>Started By: “+threads[x].poster+”</a>”);
}

//–>
</script>
</div>[/CODE]

I have tried to figure this out for a while but only found different ways of it not working. Could anyone please help me figure out how to display it like I want (see the latest blogs bit in any browser)?

I figure it may be something to do with the CSS (possibly with the <br/> also), but I’m not sure, so I posted it in this forum, sorry if that’s wrong.

I really hope one of you can help me, this is winding me up a fair bit, ha! ?

Cheers!

to post a comment
CSS

8 Comments(s)

Copy linkTweet thisAlerts:
@WebJoelFeb 14.2008 — ....and in IE the [B]background colour[/B] [COLOR=Red]hover[/COLOR] isn't working right....[/quote]#blogs a:[COLOR=Red]hover[/COLOR] { color: #FFFFFF; margin-top: 5px; margin-bottom: 5px; text-align: center; text-decoration:none; [B]background:#999999[/B];....[/quote] It may prove to be to your advantage to state "background:#999999;" as "background-[B]color[/B]:#999999;" when used without any additional declarations.

"background:[I]foo[/I];" is actually a 'shorthand method' for when combined Declarations and/or values are assigned to the same Selector:background-[B]color[/B]:#999999;

background-[B]image[/B]:url(name.gif);

background-[B]position[/B]: top center;

background-[B]repeat[/B]:no-repeat;[/quote]
becomes:[B]background[/B]:#999 url(name.gif) top center no-repeat[/quote] What you have now, [B]background:#999999; [/B][I]may work [/I]in browsers (Firefox, etc) but Firefox is very explicit, -and my HTML-editor also chokes on "background:#999999;" but works properly with "[B]background-color:#999999;[/B]".
Copy linkTweet thisAlerts:
@DemonauthorFeb 14.2008 — I changed the uses of background color on hover to all say...

background-colour: #999;

Sadly, this hasn't corrected the colour problem in IE. ?
Copy linkTweet thisAlerts:
@WebJoelFeb 14.2008 — Show me the HTML for the element that is [B]id="blogs"[/B]. There might be some conflict going on here... as stated, that should work... ?

Also:
background-[B]colour[/B]: #999;[/QUOTE] the correct spelling is "color", not "colo[B][U]u[/U][/B]r"...
Copy linkTweet thisAlerts:
@DemonauthorFeb 14.2008 — I did actually type it as "color" in the CSS, not "colour", so no worries there.

Blogs element in HTML...

<div id="blogs"><h1><strong>..:: LATEST BLOGS ::..</strong></h1>

<?php $temp_query = $wp_query; ?>

<?php query_posts('showposts=5'); ?>


<?php while (have_posts()) : the_post(); ?>

<div id="post-<?php the_ID(); ?>">

<p> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><strong><?php the_title(); ?></strong><br/><?php the_author() ?> on <?php the_time('F jS') ?></a></p>

</div>

<?php endwhile; ?>

</div>[/QUOTE]
Copy linkTweet thisAlerts:
@DemonauthorFeb 15.2008 — Someone else has solved this problem on another site I posted the problem at. For peace of mind, the problem was the outputs of the blogs and latest threads. They were formatting differently due to the latest threads code. So I had to use a slightly re-written latest threasds code which was this...

<div id="minibox2">

<h1><strong>..:: LATEST FORUM THREADS ::..</strong></h1>

<script type="text/javascript" src="http://www.media-live.co.uk/forums/external.php?type=js"></script>

<script language="" type="text/javascript">

<!--

for (x = 0; x < 5; x++)

{

document.writeln("<p><a href="http://www.media-live.co.uk/forums/showthread.php?t="+threads[x].threadid+""><strong>"+threads[x].title+"</strong><br />Started By: "+threads[x].poster+"</a></p>");

}

//-->

</script>

</div>[/QUOTE]


Thank you all the same WebJoel, that background information was very helpful.

Cheers for your effort and time!
Copy linkTweet thisAlerts:
@WebJoelFeb 15.2008 —  <div id="blogs">[B]<h1><strong>..:: LATEST BLOGS ::..</strong>[/B]</h1>[/QUOTE]"<h~>" Being a 'block-level element', it causes the 'parent element' (div id="blogs") to 'shrink wrap' the child, "<h~>". If you want "background-color:#999;" here, apply it thus:#blogs [U][B]h1[/B] {background-color:#999;}[/U][/QUOTE] That should solve this. ? This is correct, typical Firefox behaviour. I might expect IE to just go ahead and incorrectly show the background-color:#999; as-written...

OR:

#blogs [B]h1[/B] {[B]background-color:transparent;[/B]}[/QUOTE] and this might let the 'parent element's' background-color of #999; to 'show through'... but I prefer the first method.
Copy linkTweet thisAlerts:
@DemonauthorFeb 15.2008 — I'm not sure that's necessery, WebJoel. (I may not be understanding it, so forgive me if I'm not.)

The problem is now fixed and works in all browsers, and there never was an issue with the mini header sections in either the blog or latest threads bits.

Cheers!
Copy linkTweet thisAlerts:
@WebJoelFeb 15.2008 — I think I was typing while you posted, hence my come-lately follow-up. Glad it was solved.
×

Success!

Help @Demon spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.24,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...