问题描述:

I have two questions:

1) I have a div with an image that I use for my footer, but I when I resize the page the footer text gets all "mushed" together. Is there any way I can get the text to stay in a certain position and resize with the page?

2) I use a div for the body of the page, but when I try to add text and align it in position it moves the entire div. How can I get the div (which is just background color) to stay in place while I move the text around?

Here is the site and code on jsfiddle: http://jsfiddle.net/HzwV9/embedded/result/

Thanks.

网友答案:

Had a fiddle with your fiddle, here's a result that may help you: http://jsfiddle.net/HzwV9/4/

Some things I noticed:

  • A few of your HTML tags aren't closed (that's asking for trouble).
  • No need to use <h1> for your lower links; it's a block element, not an inline element, and also you'll need <a> to make a link later anyway
  • You can simplify the big list of tags at the beginning by just using * - all!

Hope this helps. Also, footers are notoriously difficult, since CSS doesn't do vertical sizing very well...there's a few solutions out there but they all have something wrong, up to you what you want to be wrong :)

相关阅读:
Top