Hey all,
If an element is absolutely positioned using coordinates, is using float (right/left) redundant, and what effect would this have if any?
nassehma.
| SitePoint Sponsor |
Hey all,
If an element is absolutely positioned using coordinates, is using float (right/left) redundant, and what effect would this have if any?
nassehma.
Basically, the float property is ignored on absolutely positioned elements. (More info.)
We miss you, Dan Schulz.
Learn CSS. | X/HTML Validator | CSS validator
Dynamic Site Solutions
Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

With absolutely positioned elements that are defined inside of relatively defined elements the top and left positions relative to that relatively defined element determine how the two elements overlap.
With absolutely positioned elements defined separately the top and left positions updated from JavaScript determine how that element moves around the page.
For absolutely positioned elements defined any other way the element will be positioned incorrectly if the browser window is not opened to exactly the size that it has been defined for. To fix this you get rid of the position:absolute and use float instead.
Stephen J Chapman
javascriptexample.net, Book Reviews, follow me on Twitter
HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
<input name="html5" type="text" required pattern="^$">
Thanks Guys I appreciate the feedback.
nassehma.
Bookmarks