PDA

View Full Version : Difference from computer to computer


paulprice85
01-05-2010, 02:39 AM
Hey all. This may be a simple one, but just designed my first site using DIV's. Design the site, preview in Safari and Firefox and all looks good, get the page to sit nice and central not too big not too small. But when I visit the site on another computer, it's way bigger so I've got these scroll bars I don't want and all is ugly and big. Is this screen resolution? Is there a way to make my site adaptive as per viewers screen etc? As well as the size not adapting to this other computer, the page is stretched out side to side, is there a way to keep it all the same from viewer to viewer and keep proportions the same?

Hope this makes sense, I'm new to this!

Thanks. Paul

edbr
01-05-2010, 02:46 AM
basically using %'s will scale the dives hwever it might be better to have a fixed width wrapper div which is centred that way the site will look consistent just with margins on either side with higher resolution screens

paulprice85
01-05-2010, 03:03 AM
ok, what's a wrapper DIV? Will the % method solve the proportion problem (stretched)?

edbr
01-05-2010, 03:15 AM
a wraper div has been described many times but it is basically a div where your site content sits. if you make that 950px wide with margin right and left auto it will always sit centre screen at that width.
If you use % it will scale so it is your choice

paulprice85
01-05-2010, 04:39 AM
genius! Thanks so much for your help. I'll give that a blast later.

Paul

paulprice85
01-05-2010, 06:01 AM
Just another quicky while its on my mind, for the main container DIV, what mode should that be in to best accommodate all inside it etc. Ie static fixed relative etc. Just the best to accommodate all, for example I dont want elements inside to move around when window size is altered.

Cheers

Corrosive
01-05-2010, 06:41 AM
Use relative positioning for all page structure. Absolute is for placing elements and should be used with caution.

paulprice85
01-05-2010, 06:55 AM
so If I put various absolute placed elements inside a div which is relative then I wont get any uneven 'moving around' when the window is resized?

Cheers

Corrosive
01-05-2010, 07:05 AM
That is true but you'll still get overlapping divs and your site won't be flexible with content. Honestly, learn site construction the 'relative' way first and the experiment with absolute.