Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,576 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,863 people online right now. Registration is fast and FREE... Join Now!




html if else

 
Reply to this topicStart new topic

html if else

musya
3 Oct, 2008 - 06:21 PM
Post #1

D.I.C Regular
Group Icon

Joined: 25 Apr, 2007
Posts: 291



Thanked: 1 times
Dream Kudos: 50
My Contributions
I got the if statment but how do you do an else statement? i couldnt find it on google
here is my if
html

<!--[if IE]>
<![endif]-->


Thank you.
User is offlineProfile CardPM
+Quote Post

tkulev
RE: Html If Else
3 Oct, 2008 - 10:14 PM
Post #2

New D.I.C Head
*

Joined: 3 Oct, 2008
Posts: 13


My Contributions
There no way, just catch all cases and write if/endif statement for all cases.
User is offlineProfile CardPM
+Quote Post

SovietRussia
RE: Html If Else
5 Oct, 2008 - 06:46 AM
Post #3

New D.I.C Head
*

Joined: 5 Oct, 2008
Posts: 29



Thanked: 1 times
My Contributions
There's no way, and I'm pretty sure other browsers don't allow conditional commenting.
However, you can say things like:
CODE

<!--[if IE 7]>
<![endif]-->

<!--[if lt IE 7]>
<![endif]-->


lt = less than
You can also use gt (greater than), lte (less than or equal to) and gte (greater than or equal to).
Helpful if you need to distinguish between, for example, IE6 and IE7.
User is offlineProfile CardPM
+Quote Post

pemcconnell
RE: Html If Else
6 Oct, 2008 - 01:22 AM
Post #4

D.I.C Regular
Group Icon

Joined: 5 Aug, 2008
Posts: 396



Thanked: 37 times
Dream Kudos: 75
My Contributions
What's this for? CSS? I would recommed doing if else statements in Javascript, or just making your CSS fully compliant.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/3/08 12:12AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month