Jump to content
franciscocunharibeiro

Center div com position:fixed

Recommended Posts

franciscocunharibeiro

Boas,

estou a trabalhar no seguinte site: http://www.getsetfestival.com/dontpanic/

Queria ter um footer fixo (que neste caso é apenas uma imagem), sempre colado em baixo. Tudo parece estar bem, no entanto não consigo centrá-lo. Alguma sugestão?

CSS:

#footer {margin:0 auto; text-align: center; position:fixed; width: 800px; bottom: 0; z-index: 50;}

HTML:

<div id="footer">
<img src="http://getsetfestival.com/2011stuff/footer_invisible.png" alt="footerinvisible" />
    </div>

Share this post


Link to post
Share on other sites
filiperainho

#footer {margin:0 auto; text-align: center; position:fixed; width: 100%; bottom: 0; z-index: 50;}

Tenta assim.


Programador - C# ; C ; PHP ; JavaScript ; CSS ; HTML ; iniciante em Android.

Share this post


Link to post
Share on other sites
Caya

#footer {margin:0 auto; text-align: center; position:fixed; width: 100%; bottom: 0; z-index: 50;}

Tenta assim.

Se o width é 100%, o margin: 0 auto não está ai a fazer nada.

Share this post


Link to post
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...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.