Jump to content

My topbar isn't at the top of the page...


terryds

Recommended Posts

Hey, everyone... Can you please help me...My topbar isn't at the top This is the screenshot : 166kfeq.png See that? the black topbar isn't at the top... This is my code CSS

 body {margin: 0px;padding: 0px;background: url(files/batthern.png) #FF6600;} .headerwrap {height: 673px;background-image: -webkit-linear-gradient(top, #990000, #FF0033);background-color: red;padding: 0px;opacity: 0.7;} .headerwrap:hover {opacity: 1;} .topbar {height: 35px;background-color: black;opacity:1;}

Any suggestions ? P.S. By the way please help me too on opacity

Link to comment
Share on other sites

This is my HTML

 <!DOCTYPE html><html><head><link rel="stylesheet" type="text/css" href="style.css"><title>My WebPage</title></head><body><div class="headerwrap"><div class="topbar"><a href="mysite" class="site"><h1>Title Site</h1></a></div></div></body></html>

Link to comment
Share on other sites

The margin of H1 is seeping pass the top edge of topbar, trying removing or adjusting this margin. Normally when this happens (collapsing margins) you apply overflow: hidden; to the container element, but! because the container is a fixed height, you would need to adjust the margin and maybe the line-height of h1 tag anyway to vertical align it correctly.

  • Like 1
Link to comment
Share on other sites

This is my HTML
 <!DOCTYPE html><html><head><link rel="stylesheet" type="text/css" href="style.css"><title>My WebPage</title></head><body><div class="headerwrap"><div class="topbar"><a href="mysite" [b]class="site"[/b]><h1>Title Site</h1></a></div></div></body></html>

just thought id mention, i dont see a class defined as .site in your CSS sheet..maybe this will help..
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...