- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘Design’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Really simple, here is my HTML and CSS.. my page has a approx 10px white space at the top, why?
[code]html{
margin:0px;
padding: 0px;
color: white;
}
.black-bar{
top: 0px;
width: 100%;
background-color: black;
height: 33px;
}
.black-bar-container{
margin: 0px auto;
width: 1000px;
line-height: 33px;
}
.black-bar-container ul{
text-align: right;
}
.black-bar-container li{
color: #CCC;
text-transform: uppercase;
display: inline-block;
margin: 0px 10px;
font-size: .7rem;
}
.container{
background-image: url(“../images/blank2.jpg”);
width:100%;
height:100vh;
background-repeat: no-repeat;
background-size: cover;
background-position-y: center;
}
.header{
height: 118px;
border-bottom: solid 1px rgba(255, 255, 255, 0.75)
}
[/code]
[code]
[/code]
We’d need a demo in Codepen.io or JSFiddle.net to see this properly. There’s not much we can tell from isolated HTML & CSS.
But my first question is, “did you remove all margin and padding from the body
?”
Oh, I see… you didn’t reset the margins on the ul
to 0.
I’d sugegst a good “css reset”.
Hi
Add margin: 0; on this:
.black-bar-container ul{
text-align: right;
margin: 0;
}