Johan Broddfelt
/* Comments on code */

Style your page

Below you can see my initial style draft. This just makes the page look like an actual web page. So that we can continue writing some code for it. We are going to add additional style elements to this file as the site progresses.

You might want to take an extra look at how I managed the body-element outside and inside of the media-query. This is to make sure that the site responds well to different screen sizes. We will add some more of these media-queries as we go along and find things that behave bad when the screen gets to small.

Otherwise the rest is kind of basic css. But I encourage you to play around with it. Change some values and see what happens.

/* This is a css reset that make sure that all browsers use the same styling to begin with */
nav ul{list-style:none}
abbr[title],dfn[title]{border-bottom:1px dotted;cursor:help}
hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}
/* end of css reset */

body {
  max-width: 900px;
  width: 100%;
  background: #ffe;
  font-family: Verdana, Geneva, sans-serif;
/* Making sure that the layout is centerd in the page on larger screens */
@media screen and (min-width:900px) {
  body {
    position: absolute;
    left: 50%;
    margin-left: -450px;
a {
  color: #962;
  text-decoration: none;
a:visited {
  color: #a73;
#top, #menu, #content, #footer {
  border: 0px dotted #cff;
  width: 100%;
#top {
  height: 100px;
#name {
  font-size: 3em;
  margin-top: 10px;
  margin-left: 20px;
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
#slogan {
  font-size: 1.1em;
  color: #999;
  margin-left: 20px;
  padding-left: 16px;
  font-family: "Lucida Console", Monaco, monospace;
#menu>div {
  background: #962;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  padding-left: 20px;
  padding-right: 20px;
#menu a {
  color: #fff;
  padding: 15px;
  text-decoration: none;
  text-transform: uppercase;
#menu a:visited {}
#menu a:hover {
  background: #a73;
#content {
  /*padding: 20px;*/
  margin-top: 10px;
  margin-bottom: 10px;
  background: #fff;
  border: 1px solid #ccc;
#footer>div {
  background: #ddd;
  padding: 20px;
  font-size: 0.8em;

- Framework, CSS

Follow using RSS

<< Main_template.php and html Adding content >>


Mail (Not public)
Send mail uppdates on new comments
0 comment