I would like to use conditions in my CSS.
The reason is because for the life of me i cannot work out how to get linear gradients to display in IE browsers so i want to have browser to display an image instead if the browser is an IE browser and to display the linear gradient code if it is any other browser.
so far my code looks like this: -
#rightsidegradientbar
-
{
-
width:50px;
-
background-image: -webkit-gradient(
-
linear,
-
right bottom,
-
left bottom,
-
color-stop(0.1, #FFFFFF),
-
color-stop(0.78, #00CCCC),
-
color-stop(1, #00CCCC)
-
);
-
background-image: -moz-linear-gradient(
-
right center,
-
#FFFFFF 10%,
-
#00CCCC 78%,
-
#00CCCC 100%
-
);
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#00CCCC');}
-
if you would like to check out my most recent question it is linked here: http://bytes.com/topic/html-css/answ...ts#post3665036
thank you in advance for any help or suggestions that you may be able to pose.
2 13739
Programming concepts like decision making and iteration (if/else and loops) are not available in CSS, as CSS is not a programing language.
However, in IE (only) you can use HTML conditional comments in include different style sheets (.css files or <style> tags) so that different CSS can be applied to the document in different conditions (i.e. different IE versions) http://www.javascriptkit.com/howto/cc2.shtml
thank you heaps sudaraka but i have solved my own gradient problem..
but i am very interested in your link and post so i will mark it as answer
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Diez B. Roggisch |
last post by:
Hi,
today I rummaged through the language spec to see whats in the for ... else:
for me. I was sort of disappointed to learn that the else clauses simply
gets executed after the loop-body - regardless of the loop beeing entered
or not.
So where is an actual use case for that feature?
I imagined that the else-clause would only be executed if the loop body
|
by: Bart Nessux |
last post by:
Should an if statement have a corresponding else statement? Or, is it OK
to have an if statement by itself. For completeness, it seems the two
should be together, but from experience I know that a if statement by
itself works just fine. Below is an example:
if x >=0:
DO SOMETHING
Would it be better, or perhaps more complete, written like this:
|
by: Ron Adam |
last post by:
There seems to be a fair amount of discussion concerning flow control
enhancements lately. with, do and dowhile, case, etc... So here's my
flow control suggestion. ;-)
It occurred to me (a few weeks ago while trying to find the best way to
form a if-elif-else block, that on a very general level, an 'also'
statement might be useful. So I was wondering what others would think
of it.
|
by: gupta.keshav |
last post by:
HI,
Is there any situation which can be handled by ternary operator but
not with if else blocks?
Thanks
Keshav
|
by: Kunal |
last post by:
Hello,
I need help in removing if ..else conditions inside for loops. I have
used the following method but I am not sure whether it has actually
helped.
Below is an example to illustrate what I have used.
Original code :
c= 0 ;
for (i=0; i<999; i++)
| |
by: Ørjan Langbakk |
last post by:
I have a form where the user has the possibility to enclose his name.
email, address and phonenumber.
I want to be able to check if some of the fields are filled - at least
one. This is so that we have some way to contact the customer.
Today I check for the existence of an email-address, and a validation
code - what I need is a way to check, eg. whether email _or_ phone is
entered, and if none is entered, display an errorpage.
|
by: divya |
last post by:
Hiii,
Please read the following piece of code:-
function SendToWebServer1(sendto) //sendto string contains a URL
{
if (document.form1.txtbookedby.value == "")
{
alert('your name field cannot be empty');
|
by: KRN000 |
last post by:
hello every one
i'm developing a web site using asp.net , with VB as the programming language. i want to ask: how can I implement "if else" conditions on the execution of a sql query? For example,write in the handler of a button :" IF radiobutton1 is selected THEN EXECUTE sqldatasource1 (or procedure1 ) ELSE EXECUTE sqldatasource2 ( or procedure2)". So I want execution of sql query to be appended with "IF ELSE" conditions.
thank you
|
by: bearophileHUGS |
last post by:
So far in Python I've almost hated the 'else' of the 'for' loops:
- I have problems to remember its meaning;
- It gives me little problems when I later want to translate Python
code to other languages (and you always have to translate long-lived
code).
- I have used it only once, so far.
So so far I'd liked to see it removed from Python 3.0.
But then this article:
|
by: arcticool |
last post by:
I was just surprised to find that "Else if" is not required in the code bit below.
Apparently "If" and "Else if" are used interchangeably. Please correct me if I'm wrong, but it
appears "Else" is just a stylistic choice.
for (int i = 1; i <= 100; i++)
{
if (i == 3)
continue;
if (i == 5)
break;
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |