Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
How to make full width footer with <footer> tag.
I'm not able to use div with id and make it looks like footer (which is pretty simple).
body{
background: #333333;
}
footer{
float:left;
background: lime;
padding:15px 0;
width:100%;
}
<footer></footer>
https://jsfiddle.net/g4b3oakd/
When i use code like this it's not in full width of page.
Is possible to do something like this?
Add margin: 0; like this: https://jsfiddle.net/DIRTY_SMITH/g4b3oakd/1/
body{
margin: 0;
background: #333333;
}
footer{
float:left;
background: lime;
padding:15px 0;
width:100%;
}
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
The footer is at the bottom as intended on my Home page and Form page. But something is causing the footer to appear at the top of my Gallery page. I'm assuming it's an issue with specificity or one of my selectors. But I'm new to this and so far everything I've tried hasn't resolved the issue.
My footer code is basic so something else must be forcing it to the top. I checked the Gallery ID's and none of them appear to be effecting my footer element.
footer {
background:#333333;
color:#FFFFFF;
padding:10px;
}
/* || gallery-items */
.gallery-item {
text-align:center;
width:300px;
height:300px;
margin:10px;
background-color:#ADD8E6;
border:10px solid #333333;
border-radius:4px;
float:left;
object-fit:contain;
}
/* || gallery item hover */
.gallery-item:hover {
border-color:#03A9FC;
}
Here is a link to my Replit. I apologize for not being able to asses what the root of the issue. This is my first week doing CSS styling.
Your .gallery-item has float: left; this means that those elements don't get "considered" as taking any space when rendering the other elements on your page. You can put a div with a style clear: both (in your case only clear:left will work) between your gallery and your footer elements to fix this
Add overflow: hidden; on #gallery-content
#gallery-content{
overflow: hidden;
}
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
I have two div elements and nav > nav_1. I am expecting to see 500x500 black color background and 50x50 blue color area on the top left but instead of showing me only 500x500 black area. how could i fix it?
.nav {
height: 500px;
width: 500px;
background-color: black;
}
.nav.nav1 {
height: 50px;
width: 50px;
background-color: blue;
}
<div class="nav">
<div class="nav_1">
</div>
</div>
First of all in your CSS, you were using .nav1 instead of .nav_1. Secondly put a space between .nav and .nav_1. Try this:
.nav .nav_1{
height:50px;
width:50px;
background-color:blue;
}
Here is a Fiddle for the same.
EDIT:
For getting a margin-top of 50px, try this:
.nav{
height:500px;
width:500px;
background-color:black;
position:fixed; /* fix position of .nav div */
}
.nav .nav_1{
height:50px;
width:50px;
background-color:blue;
margin-top: 50px ; /* put margin-top to 50px */
}
Here is the Updated Fiddle for the same.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
Hi,
I have managed a blog(wordpress) for a company and pasted their header footer code to make the site look uniform. But the social icons in header are not clickable whereas they are clickable in rest of the website. Link to the blog is: Blog
Thank you.
Try this -
.social > li > a
{
padding:5px 3px;
}
.top-bar a
{
background:#0091EA none repeat scroll 0 0;
z-index:9999;
position:relative;
}
This is the solution:
.top-bar {
background: #0091ea none repeat scroll 0 0;
clear: both;
color: #ffffff;
float: left;
font-size: 12px;
padding: 5px 0;
width: 100%;
z-index: 99;
position: relative;
}
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I cant manage to center my navigation bar. I am really new to web design and any help would be much appreciated. Here is the navigation bar.
Change the rules for ul to:
ul#menu {
list-style-type: none;
margin: 0 auto;
padding: 0px;
position: relative;
width: 705px;
}
ul {
list-style-type:none;
margin:0;
padding:0;
position: absolute;
left:25%;
right:25%;
}
Or you can set your left right as per your choice .
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Improve this question
I'm trying to build the layout of my page, so far so good. Until I've placed a image on my header.
When I try styling the image, a white line appear on top of my page. I've place the code on JSFiddle: http://jsfiddle.net/CCZjL/
When I remove the:
#header img {
width:66px;
height:61px;
position:absolute;
top:25px;
}
From my CSS file, the line is no longer there...???
Can anyone explain this to me?
Thank you!
Add margin: 0; and line-height: 65px; to #header h1
like so:
#header h1 {
text-align:center;
font-size:20px;
margin: 0;
line-height: 65px;
}
you can also remove vertical-align: middle; from #header. It's not needed.
white-space is coming from h1.
Browser applies by default styles to elements.
It is better to remove all default styles. Like:
*{
margin:0;
padding:0;
}
Write:
#header h1 {
margin:0;
}
Updated fiddle here.