Closed Thread Icon

Topic awaiting preservation: div sizing Pages that link to <a href="https://ozoneasylum.com/backlink?for=8294" title="Pages that link to Topic awaiting preservation: div sizing" rel="nofollow" >Topic awaiting preservation: div sizing\

 
Author Thread
quisja
Paranoid (IV) Inmate

From: everywhere
Insane since: Jun 2002

posted posted 09-02-2002 11:15

hey everybody,
i was wondering if you could help me out here. i have recently redeveloped my site with php, and replaced an iframe with a div that grabs content from server-side files. however if there is not much content, or narrow content in these files then the div does not fill the screen, which i would like it to do. how can i size it to the width of the users screen, whatever resolution they are using.
this page fills the screen: http://www.php50.com/quis/index.php
this page doesnt: http://php50.com/quis/index.php?p=kirsty/msn
thanks in advance

"i miss me,
i miss everything i'll never be"

HZR
Bipolar (III) Inmate

From: Cold Sweden
Insane since: Jul 2002

posted posted 09-02-2002 11:25

Dunno if I understod you right but try <div style="height: 100%">content</div>

_________________
http://hzr.dzygn.com

[This message has been edited by HZR (edited 09-02-2002).]

quisja
Paranoid (IV) Inmate

From: everywhere
Insane since: Jun 2002

posted posted 09-02-2002 12:45

yeah, i guess by your reply you understood, but i've tried that method, and it makes the div the size of the users screen width.

"i miss me,
i miss everything i'll never be"

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 09-02-2002 15:02

quisja: You code could probably do with some work as making it simper might help spot the problem - there is a lot of absolute positioning and the like. One of the problems appears to be that you have a fixed width box on the left and you want a fluid box on the right which is a little tricky (as you've seen with plenty of content it will get pushed to the edge of the screen but without it collapses back again. Some quick solutions - try them in this order:

1. Use width:auto;

2. Don't set a width on the right handside box but have another DIV in there to hold your content and set that to 100% as in most browsers this will make it 100% of the containing box and should push the box to the right size.

3. Do away with absolute positioning and use float to get the elements to butt up against each other and you might be able to use 100% width on the righthand box (not sure about this one).

4. If that doesn't work you may have to detect the size of the screen, subtract the fixed width of the lefthand box and then subtract that from the width and then set the lefthand box to that width.

Anyway points 1 or 2 should fix it.

___________________
Emps

FAQs: Emperor

« BackwardsOnwards »

Show Forum Drop Down Menu