close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Hiding Divs from IE6

Thread began 11/03/2009 3:26 am by SPT | Last modified 11/03/2009 11:47 am by Justin Nemeth | 2928 views | 5 replies |

SPT

Hiding Divs from IE6

Hello,
So I have a page built that displays correctly in all modern browsers. However in IE6 the right floated div does not float right and throws the page off.

If I could just hide the right and left columns from IE6 it would work fine.

I have tried several bug fixes but nothing works so far .
the page is :
test2.php

If it would layout correctly in IE6 with a fix/hack that would be great if not could I just make the right and left divs just not display?

I even tried using some php to redirect IE6 to a different page. I guess I did not insert the php correctly because I could never get it to work.

I would not even support IE6 but I know people who still use it...despite my recommendations.

Just so you know, I have spent hours trying stuff before asking.

Thanks!

Sign in to reply to this post

Office Guy-172461

Maybe these links will help:

The weird and wonderful world of Internet Explorer
http://www.positioniseverything.net/explorer.html


Redirection based on Browser
198/

Sign in to reply to this post

SPT

Ok I have it working now.

I used the star hack and set the right and left columns to display: none

Incase anyone else wants to use this.
In your CSS file sheet

Add the star
* html
then your rule.

Like this:

* html #TallLeft {display: none}

IE6 sees the star but the other browsers don't.

My page still looks good to IE6 without the columns and I don't need to continue to test and retest to get the columns to line up correctly...they are just gone in IE6.

Sign in to reply to this post

Justin Nemeth

That hack will indeed work, but I would recommend use conditional IE comments. It will be cleaner and will only allow IE to run the code you specify within these comments. While its true the hack seems to be ignored by other browsers, using a conditional comment will guarantee it only loads for IE.

Here's an example that would only load this CSS for IE6 and below:

<!--[if lte IE 6]>
<style type="text/css">
#TallLeft {display: none}
</style>
<![endif]-->



Check out this page for more info:
condcom.html

-justin

Sign in to reply to this post

SPT

Once again thanks Justin,

I like the if statement. I just used it to attach a IE style sheet and made my display none code there.

Works good.

Sign in to reply to this post

Justin Nemeth

Yeah, that is even better way to do by just conditionally including the entire stylesheet.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...