![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Do Floats | Do Offsets | Position | Matter? | Matter? | |
#2
| |||
| |||
|
|
I've been experimenting with floats, positioning and offsets (top, left, etc.) to see what happens when you mix the properties together. All of this brings up a this question. Is it fair to say that it would be unusual to find an element that is both floated and offset? Actually a better way to ask the question might be is it unusual to have a good *reason* to have an element that is both floated and offset? |
#3
| |||
| |||
|
|
You're trying to take a shortcut in experimenting with behaviors rather than reading, understanding and following the specifications. |
|
So, no sense in any further discussion on this - you cannot float an abs element, period. |
|
Regarding your, 'Do Offsets Matter for Static?' you should also be aware that Static does not take any offsetting properties whether block or inline. |
#4
| ||||
| ||||
|
|
So, no sense in any further discussion on this - you cannot float an abs element, period. Well, tell it to MS, then. What's happening with their absolute, right-floated, non-offset element isn't exactly floating, but it's not exactly according to specs either. |
|
Gus, you obviously place a lot more weight on specs than I do. Ultimately I have to write to the browsers, not to the specs, and the main browser I have to write to is IE. That's the unfortunate reality for me. |
|
Regarding your, 'Do Offsets Matter for Static?' you should also be aware that Static does not take any offsetting properties whether block or inline. Well, there's nothing that keeps you from specifying offsets for a static, it's just that they will be ignored. This isn't like passing parameters to a function where an invalid or meaningless parameter could make it crash. |
|
But it's true that statics don't "take" offsets because then, well, they'd be relatives, wouldn't they? |
#5
| |||
| |||
|
|
Authoring should be according to the specs with compensation to accomodate any defective browser such as IE6. |
#6
| |||
| |||
|
|
Is it fair to say that it would be unusual to find an element that is both floated and offset? |
#7
| |||
| |||
|
|
Is it fair to say that it would be unusual to find an element that is both floated and offset? It's all in: http://www.w3.org/TR/CSS21/visuren.html with specific references to: http://www.w3.org/TR/CSS21/visuren.h...tioning-scheme explains the three positioning schemes. http://www.w3.org/TR/CSS21/visuren.html#choose-position explains that there are two positioning properties - position and float. http://www.w3.org/TR/CSS21/visuren.html#position-props explains that the offsets may be applied only to an element that has a position property other than static - floats are excluded. http://www.w3.org/TR/CSS21/visuren.html#float-position explains the float algorithm - neither a position property, nor the offsets are applicable to a float. Bottom line: Not only would I say that it would be unusual to find an element that is both floated and offset, but that it is an error, not conforming to the specs, a result of bad coding due to a lack of understanding and just plain garbage. |
#8
| |||
| |||
|
|
An element can be both floated and have position:relative, in which case the box offsets apply. I tried this and it does indeed work. That being said, my belief is that this behavior is undefined and according to my understanding of the specs, should not work. Can you give a reference supporting this behavior? |
#9
| |||
| |||
|
|
Gus Richter <gusrichter (AT) netscape (DOT) net> wrote: An element can be both floated and have position:relative, in which case the box offsets apply. I tried this and it does indeed work. That being said, my belief is that this behavior is undefined and according to my understanding of the specs, should not work. Can you give a reference supporting this behavior? http://www.w3.org/TR/CSS21/visuren.h...ve-positioning |
![]() |
| Thread Tools | |
| Display Modes | |
| |