473,546 Members | 2,244 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CSS & <OPTION // "Class" Related Question

please help me with this,

<style>
#a, option.message {background-color: green; color: white;}
#b, option.message {background-color: yellow; color: black;}
</style>

<select id="thisselect" >
<option id="thisone" class="message" >THANK YOU</option>
</select>

please help me change the select option to the B style css above, also
if my syntax could be better elsewhere

Aug 23 '07 #1
4 2041
re********@gmai l.com wrote:
<style>
<style type="text/css">

I hope you have it within the `head' element.
#a, option.message {background-color: green; color: white;}
#b, option.message {background-color: yellow; color: black;}
There is little point in this stylesheet, as the second declaration for the
selector `option.message ' supersedes the first one. It is semantically
identical to

#a {background-color: green; color: white;}
#b, option.message {background-color: yellow; color: black;}

But you appear to have no elements with ID `a' or `b' in your markup, so
the first selector does not match, and the second will match only for
`option.message '.
</style>

<select id="thisselect" >
<option id="thisone" class="message" >THANK YOU</option>
</select>

please help me change the select option to the B style css above,
Sorry, I really don't understand what you mean. If I would have to make
an educated guess, I would assume that you have been testing with Internet
Explorer or another UA that does not support styling form controls the way
you want it.
also if my syntax could be better elsewhere
It would have been better posted to
comp.infosystem s.www.authoring.stylesheets, as plain CSS questions are
off-topic here.
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Aug 23 '07 #2
On Aug 23, 9:02 am, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
wrote:
rebecca...@gmai l.com wrote:
<style>

<style type="text/css">

I hope you have it within the `head' element.
#a, option.message {background-color: green; color: white;}
#b, option.message {background-color: yellow; color: black;}

There is little point in this stylesheet, as the second declaration for the
selector `option.message ' supersedes the first one. It is semantically
identical to

#a {background-color: green; color: white;}
#b, option.message {background-color: yellow; color: black;}

But you appear to have no elements with ID `a' or `b' in your markup, so
the first selector does not match, and the second will match only for
`option.message '.
</style>
<select id="thisselect" >
<option id="thisone" class="message" >THANK YOU</option>
</select>
please help me change the select option to the B style css above,

Sorry, I really don't understand what you mean. If I would have to make
an educated guess, I would assume that you have been testing with Internet
Explorer or another UA that does not support styling form controls the way
you want it.

Sure, can you respectfully run that script I provided? IE
implemention is just fine :-)
like, build 2 functions
stylesheets 1 (WHTIE)
stylesheets 2 (PURPLE)

function testbed18(){
change to stylesheets 1 attributes for a select option
}

function testbed21(){
change to stylesheets 2 attributes for a select option
}

i hope is this explains better, as long as it functions i will be a
happy camper :-) thank you so much for any help in advance.

Aug 23 '07 #3
re********@gmai l.com wrote:
[...] Thomas 'PointedEars' Lahn [...] wrote:
>Sorry, I really don't understand what you mean. If I would have to make
an educated guess, I would assume that you have been testing with Internet
Explorer or another UA that does not support styling form controls the way
you want it.

Sure, can you respectfully run that script I provided?
You have posted no script at all. You have posted what looked like a
cascading stylesheet and maybe tag-soup HTML.
IE implemention is just fine :-)
If you mean your stylesheet works as described in IE 4+/Win, that is
probably correct. However, the redundancy in the first rule, and the
fact that some controls cannot be fully styled in MSHTML, remains.
like, build 2 functions
stylesheets 1 (WHTIE)
stylesheets 2 (PURPLE)

function testbed18(){
change to stylesheets 1 attributes for a select option
}

function testbed21(){
change to stylesheets 2 attributes for a select option
}
And now?
i hope is this explains better,
Hardly. It would appear that you have to understand CSS first (what it is,
how it works), which is beyond the scope of this newsgroup. Try to
understand what I wrote about it, then try the newsgroup I mentioned before.
PointedEars
--
var bugRiddenCrashP ronePieceOfJunk = (
navigator.userA gent.indexOf('M SIE 5') != -1
&& navigator.userA gent.indexOf('M ac') != -1
) // Plone, register_functi on.js:16
Aug 23 '07 #4
Thomas 'PointedEars' Lahn said the following on 8/23/2007 10:02 AM:
re********@gmai l.com wrote:
<snip>
>>
<select id="thisselect" >
<option id="thisone" class="message" >THANK YOU</option>
</select>

please help me change the select option to the B style css above,

Sorry, I really don't understand what you mean.
What they mean is what they asked. "Please help me change the select
option to the B style above". Seems pretty straightforward in that they
are wanting to change the style of a select element via Javascript.
If I would have to make an educated guess, I would assume that you have
been testing with Internet Explorer or another UA that does not support
styling form controls the way you want it.
Your guess, whether right or wrong, is irrelevant as you didn't
understand the original question/desire of the OP.
>
>also if my syntax could be better elsewhere

It would have been better posted to
comp.infosystem s.www.authoring.stylesheets, as plain CSS questions are
off-topic here.
The question had nothing to do with CSS other than manipulating CSS
styles via JS.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Aug 23 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2787
by: Eric A. Forgy | last post by:
Hello, I am just learning Java and am trying to write a method that does something like //=========================================== public Static List find(double array,double val,String relationalOp) { List list = new ArrayList();
4
2482
by: Jian H. Li | last post by:
Hello, What's the essential differences between the two ways of "class::member" & "object.member"(or object_pointer->member)? class C{ public: void f() {} int i; };
3
1841
by: Alexander Farber | last post by:
Hi, does anyone have an idea, why do I get the following error (I have to use g++296 on RedHat Linux as compiler): In file included from r_dir.cpp:9: r_obey.h:262: declaration of `const AreaSet &CObeyFile::AreaSet () const' r_areaset.h:197: changes meaning of `AreaSet' from `class AreaSet'
4
14769
by: barney | last post by:
Hello, I' m using .NET System.Xml.XmlDOcument. When I do the following: XmlDocument xml = new XmlDocument(); xml.Load("blah"); .... xml.Save("blub"); I've got the problem that the following expression: .... snip ...
5
3424
by: martin | last post by:
Hi, I would be extremly grateful for some help on producing an xml fragemt. The fragment that I wish to produce should look like this <Addresses> <Address>&qout;Somebody's Name&quot; &lt;me@mydomain.com&gt;</Address> </Addresses>
6
12976
by: Chris Fink | last post by:
Does anyone know it is possible to include a small image(.gif .jpeg) within a <SELECT><option> so that the user would see the option text as well as a little image(icon) in the option? I know this is not an ASP.NET related question, but I know this group is knowledgeable and quick with responses. Thanks
8
3660
by: cj | last post by:
I've seen examples of web services written with <%@ WebService Language ="Vb" Class=".... at the top. Is it not used in VB 2008?
36
5078
by: Roedy Green | last post by:
The only browser I have encountered that supports <colgroup><col class="behold"></colgroup> to apply a CSS style to a whole column, is Microsoft Internet Explorer. I have been told it SHOULD NOT do so, since this is not part of the specification. How then to you apply styles to entire columns? Surely you don't have to write <td...
1
4299
by: ismailc | last post by:
Hi, I need help please. Update system to to new version & moved on to .Net2 But now my code that worked in my .Net1 xslt does not work. .Net1 fine: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:asp="remove" xmlns:igchart="remove" xmlns:igsch="remove"> &lt;td class='rowDet' id="td_<xsl:value-of...
0
7507
marktang
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...
0
7435
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...
0
7698
Oralloy
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. ...
1
7461
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5361
isladogs
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...
0
5080
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...
0
3492
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...
0
3472
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
747
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.