CSS. Creating header like facebook.
2014-01-20, 10:56 PM,
#1
Here is some basic CSS I am going to be teaching you.



There ya go.


<!DOCOTYPE HTML>
<html>
<head>
<title>facebook like css header</title>
<style>
* {
background-color: grey;
margin: 0px;
font-family: arial, helvetica, sans-serif;

}
#head {
background-color: blue;
height: 56px;
overflow: hidden;
border-bottom: 3px solid white;
}
h1 {
color: white;
position: absolute; top: 5px;
margin-left: 100px;
}

</style>
</head>
<body>
<div id="head">
</div>
<h1>CSS TUTORIAL</h1>
</body>
</html>





If you found this very Basic and easy Please give me a thanks.
Reply
2014-01-20, 11:03 PM,
#2
May I know why you use * universal tag to style your background color, font family and reset margins on everything ?

Code:
* {
background-color: grey;
margin: 0px;
font-family: arial, helvetica, sans-serif;
}

My suggestion is: "Do not ever use universal tag, unless it's really required."
If you want to reset margins, use CSS Reset or Normalize.

This would be correct.
Code:
body {
   background-color: grey;
   font-family: Arial, 'Helvetica', sans-serif;
}

Thank you for your contribution tho, but I had to correct you. Good luck in the future.
Reply
2014-01-20, 11:09 PM,
#3
I like using the universal tag, as for me it sets what you want for the page.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Custom Ogads content locker CSS Mikka07 1 541 2017-06-09, 07:22 AM
Last Post: DrKent
  OGads Custom CSS - Need Help ashu55 2 1,701 2016-12-15, 02:11 AM
Last Post: weblycos
  help in file css vip2 1 872 2016-11-25, 12:36 AM
Last Post: torothemes
  Need help learning HTLM/CSS Big Chief 29 4,775 2016-09-28, 03:09 PM
Last Post: BroketoBallin
  Custom Css for OGads ashu55 1 1,367 2016-08-01, 05:53 AM
Last Post: matz





About Us | Contact Us | CPA Elites | Advertise | Stats | Staff Team

© 2013-2017 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top