1

I have this page layout:

<header> 
<content> 
<footer>

I have border-left and right applied to content, with min-height. BUT if the content is more than the min-height then the borders don't re-adjust accordingly.

How can I fix this?

user985351
  • 197
  • 1
  • 1
  • 12

2 Answers2

2

You probably have some floating elements inside your content block, so the content block is not adjusting because of lack of 'real' content. Try adding something like <br style="clear: both;" /> inside your content block after the rest of what's inside it.
Or else, and perhaps even better, explain your problem with making a jsfiddle: http://jsfiddle.net/

kasimir
  • 1,506
  • 1
  • 20
  • 26
0

kasimir is right it is probably a clearing issue, if you are using floats, i prefer the the clearfix approach (although some foolery is needed in older versions of IE) as it is more semantically correct (i think).

http://www.webtoolkit.info/css-clearfix.html

An update with a bit of code would be useful.

Modika
  • 6,192
  • 8
  • 36
  • 44
  • I agree adding the `
    ` is a 'quick-and-dirty' method. I use it to establish where a clearfix is required. Stackoverflow being such a superb resource, already contains an excellent discussion about the best or correct method: http://stackoverflow.com/questions/211383/which-method-of-clearfix-is-best
    – kasimir Nov 03 '11 at 11:27
  • @kasimir i should have added this as a comment not an answer as yours was correct, need to learn how to use this site properly! – Modika Nov 04 '11 at 10:10