24.08.2016 Views

HTML and CSS design and build websites

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Article Parents of Floated<br />

Elements: Problem<br />

If a containing element only<br />

contains floated elements, some<br />

browsers will treat it as if it is<br />

zero pixels tall.<br />

As you can see in this example,<br />

the one pixel border assigned<br />

to the containing element has<br />

collapsed, so the box looks like a<br />

two pixel line.<br />

chapter-15/float-problem.html<br />

<strong>HTML</strong><br />

<br />

The Evolution of the Bicycle<br />

<br />

In 1817 Baron von Drais invented a walking<br />

machine that would help him get around the<br />

royal gardens faster...<br />

<br />

<br />

<strong>CSS</strong><br />

div {<br />

border: 1px solid #665544;}<br />

Result<br />

373 LAYOUT

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!