Re: Absolute positioning - a done deal?
Christopher <[email protected]> Mon, 24 Apr 2006 06:58:47 -0700
| Newsgroups | gmane.comp.web.dom.wdf |
|---|---|
| Message-ID | <[email protected]> |
Hello again, On 4/23/06, Jonathan Berry <[email protected]> wrote: > Thanks, guys. But I just tried it and it didn't work. Let me show you some > sample code that illustrates my problem. The ads are loading in and bringing > a series of divs with them. Maybe you could have a look at my code and see > what I am trying to do? > <snip> > document.write('<style > type="text/css">.floatright{float:right;position:static;}.reg{float:right;position:static;}</style>'); <snip> I'm not completely sure it's relevant, but the style declarations above contain contradictory property assignments--'float:right' will take an element out of the flow, but 'position:static' should put it back in. I'm also not sure how a browser _should_ interpret such a pair of properties applied to the same element, but a quick test in Firefox and Safari seems to show that the position declaration is ignored and the element behaves as though it had only been floated: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" /> <title>Position Test</title> <body> <div style="float:right;position:static;background:#f90;clear:both;"> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p> </div> <div style="float:right;background:#f60;clear:both;"> <p>Sed est. Sed eu sapien.</p> </div> </body> </html> -Christopher Unsubscribe [email protected] List info http://www.quirksmode.org/dom/list.html Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/wdf-dom/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/