[WSG] CSS / JavaScript Problem
Return Receipt Your [WSG] CSS / JavaScript Problem document : was Juli Waddell/OTPPB received by: at: 01/31/2005 09:52:28 AM ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help **
RE: [WSG] CSS / JavaScript Problem
Hi Jacobus, You'll need to resend this to the list as it was blocked and only sent to me because you had a read receipt request on it. Regards, Peter > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Jacobus van Niekerk > Sent: Saturday, January 29, 2005 5:33 PM > To: wsg@webstandardsgroup.org > Subject: [WSG] CSS / JavaScript Problem > > > Anybody have a solution for the following: > > I have a default style for a element: > > #s1 {height: 215px;} > > In some of the pages I need to update this value to auto, and I use > !important setting to enforce this, via a updates.css file: > > #s1 {height: auto !important;} > > Now here is the problem: > I now have to look at 2 elements, via JavaScript, in the doc, > check which > has the highest high value and assign that value to both > elements. No matter > what value I assign to both elements, the previous !important setting > overrides the new values. > > Is there any way I can override the !important setting via JavaScript? > > I need a solution quite urgent, and will keep digging into > this myself, but > if anybody knows how, I would really appreciate this. > > Thanks in advance! > > > Kind Regards > Jacobus van Niekerk > > Creative Consultant > > > web: http://www.catics.com/ | http://www.freelancecontractors.com > tel: + 27 21 982 7805 > > > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.300 / Virus Database: 265.7.4 - Release Date: 2005/01/25 > > > ** > The discussion list for http://webstandardsgroup.org/ > > See http://webstandardsgroup.org/mail/guidelines.cfm > for some hints on posting to the list & getting help > ** > ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help **
Re: [WSG] CSS / JavaScript Problem
Simply remove the !important. If both selectors have the same specifity, the last one in the source order (or last to be imported) will (*should*) take precedence. On Sat, 29 Jan 2005 08:33:03 +0200, Jacobus van Niekerk <[EMAIL PROTECTED]> wrote: > > Anybody have a solution for the following: > > I have a default style for a element: > > #s1 {height: 215px;} > > In some of the pages I need to update this value to auto, and I use > !important setting to enforce this, via a updates.css file: > > #s1 {height: auto !important;} > > Now here is the problem: > I now have to look at 2 elements, via JavaScript, in the doc, check which > has the highest high value and assign that value to both elements. No matter > what value I assign to both elements, the previous !important setting > overrides the new values. > > Is there any way I can override the !important setting via JavaScript? > > I need a solution quite urgent, and will keep digging into this myself, but > if anybody knows how, I would really appreciate this. > > Thanks in advance! > > Kind Regards > Jacobus van Niekerk > > Creative Consultant > > > web: http://www.catics.com/ | http://www.freelancecontractors.com > tel: + 27 21 982 7805 > > > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.300 / Virus Database: 265.7.4 - Release Date: 2005/01/25 > > ** > The discussion list for http://webstandardsgroup.org/ > > See http://webstandardsgroup.org/mail/guidelines.cfm > for some hints on posting to the list & getting help > ** > > -- http://leftjustified.net/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help **
[WSG] CSS / JavaScript Problem
Anybody have a solution for the following: I have a default style for a element: #s1 {height: 215px;} In some of the pages I need to update this value to auto, and I use !important setting to enforce this, via a updates.css file: #s1 {height: auto !important;} Now here is the problem: I now have to look at 2 elements, via JavaScript, in the doc, check which has the highest high value and assign that value to both elements. No matter what value I assign to both elements, the previous !important setting overrides the new values. Is there any way I can override the !important setting via JavaScript? I need a solution quite urgent, and will keep digging into this myself, but if anybody knows how, I would really appreciate this. Thanks in advance! Kind Regards Jacobus van Niekerk Creative Consultant web: http://www.catics.com/ | http://www.freelancecontractors.com tel: + 27 21 982 7805 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.7.4 - Release Date: 2005/01/25 ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help **