Wednesday, 15 August 2012

html - CSS Float and Width -



html - CSS Float and Width -

i'm wondering why adding "width" element box destroying effect of "float".

for example, when have

.login form { float: right; background-color: green; }

all elements shifts right , background color encircles elements there (it not create greenish bar @ top of screen want). figured ameliorate problem setting width,

… width: 800px; …..

but although greenish striping top of screen, of box elements seem float left, have greenish bar login elements @ left , not right.

could please tell me how take .login box element, justify of 5 attributes has right (textfields, boxes, , button), , still have greenish bar @ top of screen there blank space.

trying padding-left:(something px) ; instead of width: 800px; prepare problem

what causing problem you're using total capacity of overlaying div, makes useless float-right since there nil left float away from

html css

No comments:

Post a Comment