The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Web Design
> CSS Help
|
Why is Footer BG Image Appearing Twice
Discuss Why is Footer BG Image Appearing Twice in the CSS Help forum on Dev Shed. Why is Footer BG Image Appearing Twice Cascading Style Sheets (CSS) forum discussing all levels of CSS, including CSS1, CSS2 and CSS Positioning. CSS provides a robust way of applying standardized design concepts to your web pages.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

October 18th, 2012, 09:22 AM
|
|
Contributing User
|
|
Join Date: Jan 2004
Location: Budapest
|
|
|
Why is Footer BG Image Appearing Twice
On this site www.jimstrans.com if you look at the layout in IE8 or IE9 you'll see the footer bg appears twice. But in IE7 it looks as it should. Can someone please take a look and let me know what's going on? I would appreciate it very much. Tom
__________________
Today the world, tomorrow the universe...
|

October 18th, 2012, 01:47 PM
|
 |
For POny!
|
|
Join Date: Apr 2012
Location: Amsterdam
|
|
|
it is not.
(check your css, it clearly states: no-repeat)
|

October 18th, 2012, 04:35 PM
|
|
Contributing User
|
|
Join Date: Jan 2004
Location: Budapest
|
|
|
Thanks, on my computer, IE9, the footer bg shows up twice, one w/ the navigation links, one without. T
|

October 18th, 2012, 04:51 PM
|
 |
For POny!
|
|
Join Date: Apr 2012
Location: Amsterdam
|
|
Ah I see what you mean.
I have a feeling this is the result of the conditional comments. If I inspect it in IE9 There is an anchor that has some markup in it that is missing end-tags. You might want to remove the conditional stuff (in this manner).
To be honest I would not put html in conditional comments, or atleast more sparingly (like: your browser sucks upgrade). Rather use an extra style sheet between conditional comments. That way the content for all browsers is the same.
Have a look at the image I attached:
edit: yep it's definetly the conditional comments
run this:
Code:
<!--[if IE 7]><!-->lalalala<!--<![endif]-->
Wont show up in IE9, so you break your page
Last edited by aeternus : October 18th, 2012 at 05:01 PM.
|

October 18th, 2012, 05:26 PM
|
|
Contributing User
|
|
Join Date: Jan 2004
Location: Budapest
|
|
|
Gotcha! Thanks so much for solving the mystery!
Last edited by thall89553 : October 18th, 2012 at 05:30 PM.
|

October 18th, 2012, 05:33 PM
|
 |
For POny!
|
|
Join Date: Apr 2012
Location: Amsterdam
|
|
Quote: | Originally Posted by thall89553 First of all, I sincerely thank you for your help, it is very much appreciated.
I am not quite sure I am following you on what I need to do to fix this issue though. Would you please help me better understand what I need to do? Thank you! |
I have a feeling you didn;t write the code than
In a nutshell your conditional comments are messing things up. Conditional comments ( you may want to google it ) are little snippets of code that anything but IE understands.
In your code you have snippets like this
Code:
<!--[if IE 7]><!--></a><!--<![endif]-->
The problem is that depending on your browser the end tag (</a>) which is inside that if you look closely wont show up.
So in order to fix this I suggest your simply remove these snippets and replace them with the end-tag that is inside them:
from
<!--[if IE 7]><!--> </a> <!--<![endif]-->
to
</a>
I hope this helps
Moreover (as earlier suggested)
if you want a different style for say IE7 and lower, you can put a stylesheet in between conditional comments like so:
Code:
<!--[if lte IE 7]>
you can put you link to your stylesheet in here
<![endif]-->
Last edited by aeternus : October 18th, 2012 at 05:37 PM.
|

October 18th, 2012, 05:36 PM
|
|
Contributing User
|
|
Join Date: Jan 2004
Location: Budapest
|
|
Thanks again, I've been dealing with that issue now for years and just got around to dealing with it. You really helped me out, next time your in the Northern Cal area let me buy you lunch. ;-) 
|

October 18th, 2012, 05:39 PM
|
 |
For POny!
|
|
Join Date: Apr 2012
Location: Amsterdam
|
|
Quote: | Originally Posted by thall89553 Thanks again, I've been dealing with that issue now for years and just got around to dealing with it. You really helped me out, next time your in the Northern Cal area let me buy you lunch. ;-)  |
lol, thanks! I see you're from Budapest, not sure when I will be around there
Have fun!
Last edited by aeternus : October 18th, 2012 at 05:42 PM.
|

October 18th, 2012, 08:18 PM
|
|
|
|
another thing if you want a specific elements for all IE versions only just do <!--[if IE]> <![endif]-->
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|