CSS Float tutorial

Veröffentlicht am: 01 Januar 1970
auf dem Kanal: Tom Norman
6,413
59

A basic demonstration on how to create and control a float using CSS and HTML

A float allows an element to be moved/placed on the webpage

Float event:

elements are removed from the flow of the website. Will cause issues with non floated elements.

Use:
Float: left, right, none
Clear: left, right, both
ORDER MATTERS!!!
Items in the first position will be placed first.

@tommnorman
@schaffencreate

CODE (Be sure to add brackets to the code below)

body
    Width: 980px;

#box1
    height: 400px;
    width: 300px;
    margin: 10px;    
    background: #000;

#box2
    height: 300px;
    width: 300px;    
    margin: 10px;
    background: #F00;

#box3
    height: 200px;
    width: 300px;    
    margin: 10px;
    background: #0F0;

footer
    height: 200px;
    width: 300px;
    margin: 10px;    
    background: #00F; 

div id="box1" class="box"
/div
div id="box2" class="box"
/div
div id="box3" class="box"
/div


Auf dieser Seite können Sie das Online-Video CSS Float tutorial mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Tom Norman 01 Januar 1970 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 6,413 Mal angesehen und es wurde von 59 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!