terryds Posted April 27, 2013 Share Posted April 27, 2013 Hey, everyone... Can you please help me...My topbar isn't at the top This is the screenshot : 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 More sharing options...
niche Posted April 27, 2013 Share Posted April 27, 2013 Please post your HTML Link to comment Share on other sites More sharing options...
terryds Posted April 28, 2013 Author Share Posted April 28, 2013 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 More sharing options...
dsonesuk Posted April 28, 2013 Share Posted April 28, 2013 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. 1 Link to comment Share on other sites More sharing options...
BoDikens Posted April 29, 2013 Share Posted April 29, 2013 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now