1

I'm currently trying to create a website footer which stays positioned at the bottom of the page and have done so, although I'm having a few problems with creating content on top of this div.

.footer{ width:100%; height:80px; background:#333333; margin-top:20px; position:absolute; bottom:0; } 

Above is the current CSS styling options I've used however I still have troubles when try to create divs that display on top of this such as copyright notes.

All help would be gratefully appreciated :)!

2
  • 1
    Do you mean position in or on, because the latter doesn't really exist (or maybe isn't necessary). Commented Jan 18, 2013 at 17:59
  • Or do you mean above the footer? And is you footer a sticky footer (looks like it from the CSS)? Commented Jan 18, 2013 at 18:05

2 Answers 2

2

create a child div like so

<div class="footer"> <div>Copyright Info</div> </div> 

And give the child the css position: relative; to prevent inheritance of the position: absolute;

Sign up to request clarification or add additional context in comments.

Comments

0

I'm not sure what kind of content you want, but here are a couple examples in a jsFiddle.

jsFiddle

Basically, if you want a <div> over your footer, put it inside your footer div:

<div class ="footer"> <div class="ele"> <span class="over">Hello World.</span> </div> </div> 

And style it giving it dimensions and margins to line it up.

.ele { margin:auto; width:100px; height:100px; background-color:red; } 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.