IE workaround?

This is a discussion on "IE workaround?" within the Web Page Design section. This forum, and the thread "IE workaround? are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jul 12th, 2007, 16:21
Junior Member
Join Date: Dec 2005
Location: Dublin
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
IE workaround?

Hi,

I am using following bit of CSS which works in Firefox, Opera

body div[align="center"]{
display: none;
}

It doesnt work in IE, is this because it does not recognise the square[] brackets? And does anyone know a workaround?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jul 12th, 2007, 16:44
Most Reputable Member
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: IE workaround?

First, you should stop using HTML attributes such as align="center" and replace them with CSS and classes (or IDs). To centre a <div> horizontally relative to its containing element, use:

Code: Select all
div.someClassName {
margin: 0 auto;
width: 100px; /* or whatever width your DIV is supposed to be */
}
To centre text in a div:

Code: Select all
div.someClassName {
text-align: center;
}
Second, the attribute selector ("square brackets") does not work in IE. You can forget about using it (for a long, long time yet) -- which is a real shame.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
ie workaround

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
workaround for includes? alexgeek PHP Forum 4 Sep 15th, 2007 11:27
A workaround for a problem you might not know you have...yet Skelbo Web Page Design 1 Jul 13th, 2007 18:00


All times are GMT. The time now is 03:38.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42