0

Here I have create one div box using css stlye.

Fiddle: Correct view

But if the description is small then content misaligned as below: Misaligned box

i tried changing the position and css values, but no luck.

Can some one tell me how can I keep footer part on it's position even if the content is small.

3 Answers3

0

You need to clear the floats:

.footer-working-area {
    clear:both; /* this sets the element flow back to normal */
    background: transparent url(...) left 5px repeat-x; 
                                        /* /\ have some padding for the img */
}

Now the footer always stays below the picture, no matter how few text content you have.

Here you have the accordingly modified example fiddle.

Christoph
  • 50,121
  • 21
  • 99
  • 128
  • thanks buddy, I have one more small issue. Small box which shows `34%` can you please tell me how can I place in middle of top header? –  Nov 22 '13 at 10:27
  • in fiddle header part does not looks correctly. Please see codepan –  Nov 22 '13 at 10:29
  • @cyclic I don't know exactly how to handle codepens, but have a look at this: http://codepen.io/karimkhan/pen/uECjJ ? – Christoph Nov 22 '13 at 10:34
  • Thanks I could do it by setting top-margin! –  Nov 22 '13 at 10:43
0

You can give your text a min-height...

.text { min-height: 110px; }

... or a height if you don't expect longer texts

.text { height: 110px; }

... or clear the floats as Christoph mentioned in an other answer.

Tim S.
  • 13,597
  • 7
  • 46
  • 72
0

Add clearfix to the .text class

.text::after {
    content: "";
    display: block;
    clear: both;
}

EXAMPLE

matewka
  • 9,912
  • 2
  • 32
  • 43
  • I didn't notice that the dotted belt is the part of the footer. Anyway, this is one of the solutions. – matewka Nov 22 '13 at 10:23