Style sheet rules not working on dom created tags in IE6

  • errol187
  • Novice
  • Novice
  • errol187
  • Posts: 17

Post 3+ Months Ago

been on this for a day now and no joy besides putting the css in an external style sheet within conditional comments. There must be a simpler way.

The problem:

When opening new window from onclick event, the images, layout and some positioning is not styled. The dom created elements are displayed unstyled. If I copy and paste the content from firebug into a test html page it gets styled. So this tells me that the order of the load is the problem, well I thinks so anyhow. It would seem that the page is created befoe it is styled. Saying this, CSS rules like border and background color work fine. Uhmm!!!

Off to bed so any ideas or pointers before I strip-out and upload relevant code will be appreciated.

Speak tomoz

Errol
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

did you try applying the styles via javascript after the content is created? For example in jQuery
Code: [ Select ]
if($('#myID p')){
$('#myID p').addClass('.style');
}
  1. if($('#myID p')){
  2. $('#myID p').addClass('.style');
  3. }


This way you don't have to worry if the items exist at the time of creation they should get their styling at any time. However, you did state that this is IE6 so rules of dom creation/css rendering kind of go out the window.
  • errol187
  • Novice
  • Novice
  • errol187
  • Posts: 17

Post 3+ Months Ago

I guess that is what I was looking for...confirmation that this was maybe one of the only solutions.

That method does work but I was doing what I usually do and trying to correct what can not be corrected.

As you stated IE6 has no rules.

I had a feeling that the order was the problem and that a solution of window/document load would solve this. No joy as yet but time has run out.

I even dynamically created the head section after window/document load. Still did not work.

Put IE6 to bed...PLEASE!!!!
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

errol187 wrote:
Put IE6 to bed...PLEASE!!!!


I couldn't agree more. Maybe windows 7 adoption will help but I doubt it.

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 72 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.