ckrudelux Posted April 18, 2010 Share Posted April 18, 2010 I have a body with a fixed width 960px and some divs in it, the problem I have is what I want to make one div 100% of the browser and not 100% of the body.. well yes I could use z-index to make the width 100% but then I need a fixed height to make the rest of the page to align with it and I need the height to be relative to fit different data. <body><div class="12columns"> //If this has the same height as the child object it will work to make child object 100% of the browser window without anything geting under it. <div class="12columnswide"> </div></div><div class="4columns"></div><div class="8columns"></div></body> Hope you understand Link to comment Share on other sites More sharing options...
Err Posted April 18, 2010 Share Posted April 18, 2010 I'm not sure I understand, but I'll give it a shot.Don't make the body 960px. Instead make a parent div 960px. You can then put a div outside this parent div and make that one 100% of the browser. div's width are 100% by default BTW. .box {width: 960px;}<div>This div fills the browser.</div><div class="box"> <div>whatever I want</div> <div>More stuff</div></div> Link to comment Share on other sites More sharing options...
ckrudelux Posted April 19, 2010 Author Share Posted April 19, 2010 I'm not sure I understand, but I'll give it a shot.Don't make the body 960px. Instead make a parent div 960px. You can then put a div outside this parent div and make that one 100% of the browser. div's width are 100% by default BTW..box {width: 960px;}<div>This div fills the browser.</div><div class="box"> <div>whatever I want</div> <div>More stuff</div></div> Yes one way of doing it but the problem is then you want to move it in the middle of stuff, and all boxes moves by a drag n drop. I can't see any way it will work with the drag n drop.Been thinking of using JS but it's a poor solution. Link to comment Share on other sites More sharing options...
Err Posted April 20, 2010 Share Posted April 20, 2010 If you want to drag-'n'-drop boxs around, JavaScript or Java is the only way to do that. Link to comment Share on other sites More sharing options...
ckrudelux Posted April 20, 2010 Author Share Posted April 20, 2010 If you want to drag-'n'-drop boxs around, JavaScript or Java is the only way to do that.I have a drag and drop system but by cutting my divs for this special div the drag and drop system won't work with the current setup. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.