tags:

views:

164

answers:

2

Hi,

just a quick question: Could I apply position relative and float left on one element? Does someone use it?

div {
  float: left;
  position: relative;
  top: 0px;
  left: 0px;
  (...)
}

Thanks!

A: 

Could I apply position relative and float left on one element?

Yes. Try it out.

Pekka
+1  A: 

Yes.

CSS2.1, 9.4.3:

"Once a box has been laid out according to the normal flow or floated, it may be shifted relative to this position. This is called relative positioning"

Jonatan Littke
Great answer! Thank you!
Randy Mayer