Learn CSS #39

CSS Website Layout


Website Layout

A website is often divided into headers, menus, content and a footer:

Header
Navigation Menu
Content
Main Content
Content

There are tons of different layout designs to choose from. However, the structure above, is one of the most common, and we will take a closer look at it in this tutorial.


Header

A header is usually located at the top of the website (or right below a top navigation menu). It often contains a logo or the website name:

Example

.header {
  background-color: #F1F1F1;
  text-align: center;
  padding: 20px;
}

Result:

Header


Navigation Bar

A navigation bar contains a list of links to help visitors navigating through your website:

Example

/* The navbar container */
.topnav {
  overflow: hidden;
  background-color: #333;
}

/* Navbar links */
.topnav a {
  float: left;
  display: block;
  color: #f2f2f2;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
}

/* Links - change color on hover */
.topnav a:hover {
  background-color: #ddd;
  color: black;
}

Result


Content

The layout in this section, often depends on the target users. The most common layout is one (or combining them) of the following:

  • 1-column (often used for mobile browsers)
  • 2-column (often used for tablets and laptops)
  • 3-column layout (only used for desktops)

1-column:

2-column:

3-column:

We will create a 3-column layout, and change it to a 1-column layout on smaller screens:

Example

/* Create three equal columns that float next to each other */
.column {
  float: left;
  width: 33.33%;
}

/* Clear floats after the columns */
.row:after {
  content: "";
  display: table;
  clear: both;
}

/* Responsive layout - makes the three columns stack on top of each other instead of next to each other on smaller screens (600px wide or less) */
@media screen and (max-width: 600px) {
  .column {
    width: 100%;
  }
}

Result

Column

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas sit amet pretium urna. Vivamus venenatis velit nec neque ultricies, eget elementum magna tristique.

Column

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas sit amet pretium urna. Vivamus venenatis velit nec neque ultricies, eget elementum magna tristique.

Column

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas sit amet pretium urna. Vivamus venenatis velit nec neque ultricies, eget elementum magna tristique.


Tip: To create a 2-column layout, change the width to 50%. To create a 4-column layout, use 25%, etc.

Tip: A more modern way of creating column layouts, is to use CSS Flexbox. However, it is not supported in Internet Explorer 10 and earlier versions. If you require IE6-10 support, use floats (as shown above).


Unequal Columns

The main content is the biggest and the most important part of your site.

It is common with unequal column widths, so that most of the space is reserved for the main content. The side content (if any) is often used as an alternative navigation or to specify information relevant to the main content. Change the widths as you like, only remember that it should add up to 100% in total:

Example

.column {
  float: left;
}

/* Left and right column */
.column.side {
  width: 25%;
}

/* Middle column */
.column.middle {
  width: 50%;
}

/* Responsive layout - makes the three columns stack on top of each other instead of next to each other */
@media screen and (max-width: 600px) {
  .column.side, .column.middle {
    width: 100%;
  }
}

Result:

Side

Lorem ipsum dolor sit amet, consectetur adipiscing elit…

Main Content

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas sit amet pretium urna. Vivamus venenatis velit nec neque ultricies, eget elementum magna tristique. Quisque vehicula, risus eget aliquam placerat, purus leo tincidunt eros, eget luctus quam orci in velit. Praesent scelerisque tortor sed accumsan convallis.

Side

Lorem ipsum dolor sit amet, consectetur adipiscing elit…


Footer

The footer is placed at the bottom of your page. It often contains information like copyright and contact info:

Example

.footer {
  background-color: #F1F1F1;
  text-align: center;
  padding: 10px;
}

Result:

Footer

Categories

169 Responses

  1. cialis professional Revealed that the simple partitioning of mitotic signaling molecules among cells is enough to account for the creation at predictable times, to predictable sizes, and to predictable shapes of the tissues, organs, and anatomical structures that arise during the development of multicellular organisms 1

  2. Водостойкие карандаши с нежной текстурой есть в линейке продуктов других фирм – Urban Decay, MAC, Inglot, «Ив Роше». Каял подходит не только для слизистой век. За счет мягкой консистенции его применяют для подводки верхнего века, губ, в качестве теней, с растушевкой – как румяна. Для чего нужна такая стойкость? Ну, например, для праздничного, вечернего или свадебного макияжа. Ваши стрелки не растекутся, даже если вы будете плакать и тереть глаза руками. Сотрётся тушь, сотрутся тени… Но не стрелки. Скажу больше: они даже не потрескаются, будут выглядеть, как новенькие. Журналист, путешественник. Открываю мир для себя и для читателей Правда, стойкость у неё не такая феноменальная, как у предыдущей. Да, под дождём она не растечётся, но если чуть-чуть потереть глаз — прощай, стрелки. Хотя, чаще всего, мне такая стойкость и не нужна. Поэтому данный лайнер использую намного чаще. Когда нужно сделать макияж глаз, просто задумайтесь над тем, какой эффект Вы хотели бы получить. Карандаш будет прост и удобен. Фломастер сможет наложить наиболее насыщенный оттенок, что создаст дополнительную глубину. Тени понадобятся тем, у кого имеется эффект жирного блеска на веках, они замутнят такой эффект. Гелевая подводка придаст нужную форму. https://www.debtrecoverydr.co.uk/community/profile/romamckeown4516/ Акриловая тушь на водной основе. Является несмываемой после высыхания и образования пленки. В мокром виде(не засохшая) смывается. Результаты поиска Штрих-код: 6923991401851 Применение: тушь широко применяется в графических, художественных работах и каллиграфии. Предназначена для любительского и профессионального использования, но для заправки в рапидографы и изографы не подходит. Тушь (чернила) DRAWING INK для рисования компании Royal Talens производятся из высококачественных красителей путем растворения их в щелочном растворе. Стойкие, яркие цвета, не является водоустойчивой, за исключением золотой, серебряной и Жидкой индийской. Тушь можно разводить дистиллирован $5.22 Тушь для волос Милая Леди Сказочный патруль, желтая за 441 руб. Фиолетовая тушь. Вот настоящая находка для голубоглазых красавиц. Фиолетовый многократно усиливает цвет глаз и делает их похожими на небесную синь. Но здесь важно смотреть, чтобы цвет туши был не слишком ярким, а слегка «припыленным». С зелеными и темно-карими глазами этот оттенок сочетается не очень: его просто становится не видно, и вся затея теряет смысл.

  3. Über die Autorin Below is a complete list of all the slot games catalogued by Slotseek.com, each linking to a list of casinos that have each specific game. If you want games from a particular developer, click the ‘Slot Game Categories’ link above. Magic Monk Rasputin für Echtgeld spielen Natürlich gibt es bei Magic Monk Rasputin noch einen kleinen Haken, der das Erreichen der Gewinne noch ein wenig schwieriger macht. Huscht Rasputin durch das Bild, kann es sein, dass er bald alle Gewinne zurücksetzt. Man kann Zwischenbeträge annehmen; sieht man also Rasputin durch das Bild laufen, dann sollte man sich überlegen, den nächsten Gewinn anzunehmen, bevor er den Spieler wieder ans untere Ende der Türme bringt. Magic Monk Rasputin may be a unique slot product, but it isn’t a slot machine that everyone will find attractive. The potential to win worthy prizes is definitely there (up to 2,500x payouts), but the way you have to win them may be too risky for some. Each time you hit a prize, it takes a few steps to collect it – which can be a hassle. Plus, there’s always the risk of losing more payouts at once with a random appearance from Rasputin. Whether this bothers you or not is for you to decide, but the slot is definitely worth a look. https://elearning.imagomindful.com/community/profile/gregoryyarnold/ Pro Euro Einsatz werdet ihr über einen längeren Zeitraum durchschnittlich 5,26 Cent pro Spiel verlieren. Dabei spielt es keine Rolle, auf welche Wette ihr eure Jetons setzt, die einzige Ausnahme ist beim Amerikanischen Roulette die Fünferwette 0,00,1,2,3, dort liegt der Wert bei -0,0789 (-7,89%). Ausnahmen gibt es auch, wenn die La Partage Regel zum Einsatz kommt. Was macht das Roulette Spiel so interessant? Der Grund dafür ist sicherlich die Tatsache, dass das Kesselspiel spannend und lukrativ zugleich ist. Viele tausend Menschen halten sich täglich in landbasierten Spielcasinos auf, um die Roulettekugel über ihr Schicksal entscheiden zu lassen und mit ein wenig Glück große Gewinne abzuräumen. Schon seit Jahrhunderten ist das Spiel genau deswegen so beliebt und bekannt. Das Internet bietet grundsätzlich die Möglichkeit, jederzeit von überall aus dem Spiel nachgehen zu können, dennLeider bringen lokale Etablissements einige Nachteile mit sich.

  4. For the first time I became interested in sex toys at the age of 19-20. After graduation, I worked a little and got the opportunity to pamper myself. Moreover, there was no relationship then, and sex too … Around the same time, there was the first visit to the sex shop – a very exciting event! I decided more than a month, and until the last I doubted, but the desire to experience something “special” still overpowered. I remember I was very excited at the mere thought that I would have to walk and look, tell the sellers what you want to buy, and how they would look at you after that … After a month of doubts, I still came. Half an hour looking for the entrance to the sex shop. I walked around the building 10 times, but there was no sign of the entrance. Just a residential building with a few shops – no signs, no signs, nothing at all. And the entrance was inside one of the usual shops. Well camouflaged. Later, a sign was also found – small, modest and completely inconspicuous.
    The sex shop https://self-lover.store/lubrikanty-na-silikonovoy-osnove/ had a nice atmosphere, dim lights and no one but 2 male salespeople. The room was divided into several thematic parts. The first had only sex toys, the second was all for role-playing, and the third was erotic lingerie. Walked and looked. Not to say that he was very shy, but he still experienced a certain tension.
    For the first time I took a few toys:
    1. A simple vagina (masturbator). It was unpleasant to use without a condom (albeit with lubrication) due to the hard internal relief. If with a condom, then everything is fine. But the orgasm came too fast, so it wasn’t very interesting. In general, it felt no different from the usual strong hand grip on the cock.
    2. Small anal vibrator. https://self-lover.store/nasadky-na-chlen/ In principle, he became a favorite toy during masturbation, he always finished with him very hard. https://self-lover.store/muzhskoe-eroticheskoe-bele/ During orgasm, he slipped out of the ass, so you had to hold him or not use lubricant. Then I noticed that if, after ejaculation, you insert it into yourself again, then a second erection occurs much faster. By the way, it was after meeting with the vibrator that I realized what the secret of the prostate is, and that it stands out from its stimulation.
    3. Small butt plug. I liked to put it on the edge of the table https://self-lover.store/massazhery-prostaty/ and sit down ass. At first, just sit and get high, move a little – the erection was iron, lubricant was constantly emitted from the penis. But still, it didn’t work out from sex toys (without penis stimulation).
    Then there were new toys:
    4. Tried a full dildo first (no vibration). I was attracted to it by its appearance – beautiful, delicate material, pleasant to touch, but it turned out to be too large (4 cm thick). After several uses, I realized that the experiments with large toys are over.
    5. Then came a small anal dildo https://self-lover.store/stimuliruushchie-sredstva-i-prolongatory/1300/ on a suction cup – thin, curved, hard, with a relief head. I’ve had a lot of fun with him. I attached it on the table, and on the wall in the bathroom, and in the position of a rider in bed … Most of all I liked to sit on it and sway at a slow pace for 20-30 minutes (without touching the penis). I liked it more than the orgasm itself.
    6. There were also several prostate massagers. Moreover, both very inexpensive and top … Advertising, as always, lied – not a single such massager can replace a living finger. There is something https://self-lover.store/kosmetika/ to compare with in this regard … It’s nice, of course, and there weren’t any massagers, but it didn’t work out from them (without penis stimulation). But from the female finger finished.
    7. There were anal beads and chains. https://self-lover.store/zbudzhuiuchi-i-stymuliuiuchi-mastyla/ Also amusing toys, but completely useless. Compared to vibrators, it’s somehow completely uninteresting.
    8. Realistic vagina (masturbator) also turned out to be a complete marketing bullshit. And it doesn’t even look like real sex. Don’t get fooled!
    After 2-3 years of experiments, I realized that I was wasting my money. Not that I really regret it, after all, this is a certain sexual experience, but I realized one thing – in my relationship, these things are clearly superfluous. In sex, I like to caress, touch, hug, talk… And all these toys simply distract and interfere. You’re shifting responsibility from your hands and dick to a piece of plastic. So uninteresting…
    When there was no sex for more than a year, there was no desire to take up toys again. More interested in relaxing and erotic massage. Not all sorts of salons, but personal acquaintances. It is much more pleasant to spend time with a living person than with a piece of plastic. Then for some time there was an opportunity to practice erotic massage. After that, I realized that sex toys https://self-lover.store/podarochnye-nabory/1239/ are something so primitive compared to what you can do with your own hands, that this is really what is called “the industry is fed.” But “experience is the son of difficult mistakes”, and apparently it was necessary to go through this in order to understand. Not a penny of the sex industry! A living person is everything. Plastic is nothing.

Leave a Reply

Your email address will not be published. Required fields are marked *