Log in

View Full Version : How to extend the block to its maximum size ???



paul.necsoiu
02-12-2010, 01:15 PM
Hi,

On my site www.investx.mobi I have the fallowing block
<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 ....how 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.

simcomedia
02-12-2010, 06:20 PM
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.