HighDots Forums  

[CSS|JS] questions

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss [CSS|JS] questions in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
onetitfemme
 
Posts: n/a

Default [CSS|JS] questions - 04-30-2006 , 01:20 PM






Quote:
Why is it that sometimes you must use inline styles? (I have tried
doing it in may different ways)
Do a google search on "css specficity", but that's outside the scope of this group.
Matt Kruse wrote:
css specificity ...
I wonder to which extent I could have conflicting CSS rules, since in
my trials I used both classes and id selectors and found the same
behavior. Also I post here in this group too, because JS and CSS do not
always play well together when you dynamically play setting/(re)-/(un)-
CSS properties with JS
..
Here are the two examples, one with inline styles and the other with a
CSS.
..
// __ this one works!
http://www.geocities.com/tekmonk2005...02_inline.html
..
// __ this other one, based on CSS-based styles, does NOT!
http://www.geocities.com/tekmonk2005/example04_css.html
..
Both pages validated (except for the unfinished form, which I complete
dynamically and whose "action" you don't really need in this case)
..
I need to understand this prob and fix it because I don't see any
benefit in using inline styles
..
Also:
..
How can you work around the "end tag for "..." which is not finished."
types of errors?
..
The form element I need only in order to format the pop up and to use
the id selector, in order to feed it in with. I need to complete the
forms dynamically because I work on multilang sites
..
Also there are ways to dynamically insert elements in a select box via
"new Option(...)". How can you do the same thing with radio button or
check boxes options in a form?
..
otf js css



Reply With Quote
  #2  
Old   
Randy Webb
 
Posts: n/a

Default Re: [CSS|JS] questions - 04-30-2006 , 04:12 PM






onetitfemme said the following on 4/30/2006 2:20 PM:
Quote:
Why is it that sometimes you must use inline styles? (I have tried
doing it in may different ways)
Do a google search on "css specficity", but that's outside the scope of this group.
Matt Kruse wrote:
css specificity ...
I wonder to which extent I could have conflicting CSS rules, since in
my trials I used both classes and id selectors and found the same
behavior. Also I post here in this group too, because JS and CSS do not
always play well together when you dynamically play setting/(re)-/(un)-
CSS properties with JS
..
Here are the two examples, one with inline styles and the other with a
CSS.
..
// __ this one works!
http://www.geocities.com/tekmonk2005...02_inline.html
..
// __ this other one, based on CSS-based styles, does NOT!
http://www.geocities.com/tekmonk2005/example04_css.html
..
Both pages validated (except for the unfinished form, which I complete
dynamically and whose "action" you don't really need in this case)
If you complete it dynamically then completely create it dynamically.
But, you shouldn't say it validated, you should say "It validated before
I put it on Geocities".

Quote:
..
I need to understand this prob and fix it because I don't see any
benefit in using inline styles
Then don't if you don't understand them.

Quote:
Also:
..
How can you work around the "end tag for "..." which is not finished."
types of errors?
End the tag, no more "end tag...." errors.

Quote:
The form element I need only in order to format the pop up and to use
the id selector, in order to feed it in with. I need to complete the
forms dynamically because I work on multilang sites
Then create the form dynamically as well.

myForm = document.createElement('form')

Quote:
..
Also there are ways to dynamically insert elements in a select box via
"new Option(...)". How can you do the same thing with radio button or
check boxes options in a form?
radioInput = document.createElement('input')
radioInput.type = "radio"

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/


Reply With Quote
  #3  
Old   
onetitfemme
 
Posts: n/a

Default Re: CSS and/or JS questions - 04-30-2006 , 06:13 PM



Quote:
The form element I need only in order to format the pop up and to use
the id selector, in order to feed it in with. I need to complete the
forms dynamically because I work on multilang sites

Then create the form dynamically as well.

myForm = document.createElement('form')
..
You know when I code JS I expect for things not to work ;-). I wonder
how cross browser these (to me) naively looking statements are. (new
Option(...)) statements are DOM 0 so they will probably work flawlessly
in all browsers, but I wonder if the same applies to check boxes and
radio buttons.
..
Quote:
..
Also there are ways to dynamically insert elements in a select box via
"new Option(...)". How can you do the same thing with radio button or
check boxes options in a form?

radioInput = document.createElement('input')
radioInput.type = "radio"
..
Thanks and let me test this in all browsers I need to test this web
app.
..
onetitfemme



Reply With Quote
  #4  
Old   
Randy Webb
 
Posts: n/a

Default Re: CSS and/or JS questions - 04-30-2006 , 09:38 PM



onetitfemme said the following on 4/30/2006 7:13 PM:
Quote:
The form element I need only in order to format the pop up and to use
the id selector, in order to feed it in with. I need to complete the
forms dynamically because I work on multilang sites

Then create the form dynamically as well.

myForm = document.createElement('form')
..
You know when I code JS I expect for things not to work ;-). I wonder
how cross browser these (to me) naively looking statements are. (new
Option(...)) statements are DOM 0 so they will probably work flawlessly
in all browsers, but I wonder if the same applies to check boxes and
radio buttons.
ISTR a browser that had problems with new Option. I don't remember the
browser and I don't remember the problem to be honest. But, if a browser
doesn't support createElement then it is sufficiently broken/old enough
not to worry with it.


--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.