Help centering footer text
-
Hello
I’ve placed two lines of text in the footer of my site. I’ve then centered them so that it looks like this: http://share.xboxlife.dk/files/mdy4yjrlyzcwntk2owqyntlizju1ndy1zmy0ytyzmmi.jpg
But I want them to look like this and still be centered: http://share.xboxlife.dk/file/yjyznjixmjviy2fkm2m0othhztc5nmfjmzgzotmymwu.jpg
I’ve tried adding a left align to the text and then some left-margin to center it, and it worked fine in my own monitor. But to visitors, who use different sized monitors, the margin might be to big or small so that it isn’t centered anymore.
How can I fix this?
My site: http://www.geimaku.com/
Thanks.
-
It IS centered in the browser window — no matter how wide. Is that not what you want?
Hi
Yes, I know it’s centered in all windows but I want it to look like this:
http://share.xboxlife.dk/file/yjyznjixmjviy2fkm2m0othhztc5nmfjmzgzotmymwu.jpg
Do you mean that the two lines of text be left aligned? If so, you will need to put the text content inside an element — and center the element using a set width and margin: 0 auto; . The text should be left aligned in the enclosing (new) element.
Okay. I’ve left aligned the tha text by placing it inside these <div align=”left”>…</div>
Then I’ve added these lines of CSS:
#site-generator div {
margin: 0 auto !important;
width: 0 auto !important;
}I’m not sure if this is what you mean, but it didn’t work??
The <div align=”left”> left aligns the div NOT what is inside it. The content inside will be left aligned by default — unless otherwise specified. You also need a set width that is less than 100% for the auto margin centering to work — which is not what you have
Assign an ID to the new div and use that to use EXTERNAL CSS to center it — i.e.
<div id="footertext"> existing content in here </div>CSS would be:
#footertext { width: 80%; margin: 0 auto; }It is as I want it now. Thank you!
The topic ‘Help centering footer text’ is closed to new replies.