html - add css background to div -
i have following document structure ,
<div style="background:#000000;"> <input type="button" style="float:right" value="click here"/> <input type="button" style="float:right" value="click here"/> </div>
but dont give me result want.i want background repeated on div body in shown in image
any highly appreciated
firstly, you're missing 0. #00000
isn't valid hex colour code. hex colour codes must either contain 3 or 6 hexadecimal digits. resolve this, add 0 (or remove 2 of 0s):
<div style="background:#000000;"> ... </div>
from css color module specification:
the format of rgb value in hexadecimal notation ‘#’ followed either 3 or 6 hexadecimal characters. three-digit rgb notation (#rgb) converted six-digit form (#rrggbb) replicating digits, not adding zeros. example, #fb0 expands #ffbb00. ensures white (#ffffff) can specified short notation (#fff) , removes dependencies on color depth of display.
secondly, when floating elements need clear them afterwards, floating takes them out of page's context. can refer what methods of ‘clearfix’ can use?.
Comments
Post a Comment