|
| Index | Recent Threads | Unanswered Threads | Who's Online | User List | Help |
|
|
| No member browsing this thread |
|
Thread Status: Active Thread Type: Sticky Thread Total posts in this thread: 10
|
|
| Author |
|
|
Stranger USA Joined: Mar 19, 2006 Post Count: 11 Status: Offline |
I am an extreme beginner. I am having such trouble with getting my website to render correctly in IE. I have read a little about css conditional comments for IE, but I have no idea how to code that... can anyone help me with this? |
||
|
|
Advanced Member Joined: Sep 3, 2005 Post Count: 2206 Status: Offline |
Just wrap the comment tags around whatever code you want to be specific to IE. Write your code as you normally would, then if an element needs certain values different for IE write it again with the conditional comment tags. Conditional comments come after your other code. For example, mydiv has a top margin of 5 px, but in IE you want the top margin to be 10px, it would look like this: <style>Or if you were using a seperate style sheet create a second one for IE writing your CSS as usual. Only include what needs redefining, you don't need to rewrite your entire CSS. Then add a link to it in the head of of your document like this: If it is only one element on a page that needs redefining you can combine the two rather than adding a seperate style sheet: <link rel="stylesheet" type="text/css" href="mysite/styles.css">Conditional comments can also be used to target specific versions of IE. For example instead of writing <!--[if IE]> writing <!--[if IE5]> would only target IE version 5. ---------------------------------------- Quiquid latine dictum sit altum viditur ---------------------------------------- [Edit 1 times, last edit by billyboy at Mar 20, 2006 12:24:22 PM] |
||
|
|
Advanced Member USA Joined: Nov 27, 2003 Post Count: 6285 Status: Offline |
Good reply |
||
|
|
Stranger USA Joined: Mar 19, 2006 Post Count: 11 Status: Offline |
Thank you so much for your help. I will make the changes and update you later. |
||
|
|
Advanced Member USA Joined: Mar 24, 2005 Post Count: 3000 Status: Offline |
Yep good info. Keep in mind that the conditional statement has to be written with spaces in between each declaration. If IE 5 and If lte IE 6 vs If IE6 ![]() ---------------------------------------- "The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo Save the developers<!> Maine Webworks |
||
|
|
Stranger USA Joined: Mar 19, 2006 Post Count: 11 Status: Offline |
Thanks so much Billy and John for your input. I did make the changes that you suggested and everything worked out just find. I did want to ask if there was also a way to make conditional comments for Opera. The home page of the website is not rendering correctly in this browser.Here is the site: http://www.freewebs.com/kiara4life2/index.html How do I get this link to appear as a link in this post??????If you want to see the css for it, you can find it in my other post: Help Extreme Beginner!...... Also the only other problem with the site is that IE keeps applying the attributes that were set for p:first letter, even though the attributes were redefined in for p.copyrighthome:first-letter, can either one of you help me with this?Thanks so much! ---------------------------------------- [Edit 8 times, last edit by MzTooMuch at Mar 22, 2006 9:18:43 AM] |
||
|
|
Advanced Member USA Joined: Nov 27, 2003 Post Count: 6285 Status: Offline |
At least IE7 seems to do well without Conditional Comments... bummer we have to keep them for IE6 for quite some time still... |
||
|
|
Stranger USA Joined: Mar 19, 2006 Post Count: 11 Status: Offline |
Hey Kyle, I know that is a bummer. Hey can you tell me if I can set conditional statements for Opera? And how can I make my links appears as hyperlinks in my posts???? |
||
|
|
Advanced Member USA Joined: Nov 27, 2003 Post Count: 6285 Status: Offline |
Conditional Comments are IE only and are not standard HTML, Opera generally does things standards way so they are not needed. However if you look at IE in Opera my banner text is offscreen above which no other browser does. Have not had time to fix it yet. Your links will be activated when you post a certai number of posts, it is to help stop hit and run spammers we were getting alot of. |
||
|
|
Advanced Member Joined: Jun 14, 2003 Post Count: 2940 Status: Offline |
With so much talk about IE conditional comments, I decided to create a video tutorial on it. IE conditional comments video tutorial Let me know what you all think. Thanks, Stefan ---------------------------------------- Stefan Mischook Video Tutorial Store | Web Templates |
||
|
|
|
|
|
Current timezone is GMT May 22, 2013 6:27:54 PM |