I have been reading up on html5 when I encounter this thing called webkit. well I don't really know what is it or what is does so I came up with two examples.
Is there any difference between the css style that I wrote? from what I seen, both the css gave me the same output. which will be a more perferred way?
style.css
body {
text-align: center;
}
#wrapper {
border: 4px solid black;
width:1000px;
margin:20px auto;
text-align: left;
}
#top_header {
background:yellow;
border: 2px solid blue;
padding:20px;
}
#nav_bar {
border: 2px solid red;
background:grey;
color:white;
}
#nav_bar li {
font: bold 14px Tahoma;
display:inline-block;
list-style:none;
padding: 5px;
}
v.s
style.css
body {
width:100%;
margin:20px auto;
display:-webkit-box;
-webkit-box-pack:center;
}
#wrapper {
width: 1000px;
display:-webkit-box;
-webkit-box-pack:center;
-webkit-box-orient:vertical;
-webkit-box-flex:1;
}
#top_header {
background:yellow;
border: 2px solid blue;
padding:20px;
}
#nav_bar {
border: 2px solid red;
background:grey;
color:white;
}
#nav_bar li {
font: bold 14px Tahoma;
display:inline-block;
list-style:none;
padding: 5px;
}
index.html
<!DOCTYPE html>
<html-lang="en">
<head>
<meta charset=UTF-8" />
<title>Learning Web Design</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="wrapper">
<header id="top_header">
<h1>Learning Website </h1>
</header>
<ul>
<li>navBarOne</li>
<li>navBarTwo</li>
<li>navBarThree</li>
</ul>
</nav>
</div>