1 / 8

Technologies for web publishing

Technologies for web publishing. Ing. Václav Freylich. Lecture 6. Content. CSS layouts Flexible three column layout. Header. Menu. Main content box. Submenu,voting, news, …. Footer. What is the idea?.

opa
Télécharger la présentation

Technologies for web publishing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Technologies for web publishing Ing. Václav Freylich Lecture 6

  2. Content • CSS layouts • Flexible three column layout aTNPW1-6

  3. Header Menu Main content box Submenu,voting, news, … Footer What is the idea? We want to create the layout with two fixed side columns and one fexible column in the centre. When resize the window the content box size is changed. The header and footer width is changed. The side boxes aren’t changed aTNPW1-6

  4. Four possible situations 1) 2) 3) 4) aTNPW1-6

  5. Four possible situations 1) and 2) One of the sidebars is longer than the content box 3) Content box is longer than sidebars 4) Content box is shorter than sidebars In all described situations we need to keep the footer at the bottom! aTNPW1-6

  6. 1 2 4 3 5 Solution - the floating boxes • Mark the boxes with numbers (numbers are the order of boxes in HTML code) • The order of the boxes 2 – 4 – 3 is important ! • Boxes 2 and 3 are floating ! aTNPW1-6

  7. HTML code Put the boxes into the HTML code according their order <div id=“layout”> <div id=“header”>Header text</div> <div id=“menu”>Menu items</div> <div id=“right”>Voting, news, …</div> <div id=“content”>Main content</div> <div id=“footer”>Footer content</div> </div> aTNPW1-6

  8. CSS style Create the CSS style definitions #header { width: 100%; height: 50px; background-color: blue;} #menu { width: 150px; height: 350px; background-color: red; float: left; } #right { width: 150px; height: 250px; background-color: yellow; float: right; } #content {color: red;} #footer {clear: both; background-color: green;} aTNPW1-6

More Related