Results 1 to 2 of 2

Thread: How to extend the block to its maximum size ???

  1. #1
    Join Date
    Feb 2010
    Thanked 0 Times in 0 Posts

    Question How to extend the block to its maximum size ???


    On my site I have the fallowing block
    HTML Code:
    <div id="ja-mainbody" style="margin-right: 170px;" > .
    As you can see with firebug this div tag have the width: auto;

    The problem is that this block is not automatically extended to its maximum size but extends to the size of the inside content.

    For example the width of the block is the width of text: "block has the same length as this text to make the maximum width although the text is shorter?" from the page.. If I increase the text length then the width of the block will increase also.

    But what I want is that the block size to have always maximum width regardless of the text or content width.
    Last edited by paul.necsoiu; 02-12-2010 at 01:44 PM.

  2. #2
    Join Date
    Sep 2008
    Seattle, WA
    Thanked 11 Times in 11 Posts


    Instead of width: auto; use width: 100%; and it will stretch to the limits of the container it's held in. You can also specify a minimum width so it doesn't collapse more than you want by using min-width: 400px; or whatever you'd like.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts