Pixel2Life Forum: Webpage that fits ANY resolution - Tutorial Requests - Pixel2Life Forum

Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Webpage that fits ANY resolution

Array

#1 User is offline   hughveal 

  • Young Padawan
  • Pip
  • Group: Members
  • posts 2
  • Joined: 05-August 07
  • Gender:Male
  • Location:Morrisville, NC

Posted 02 November 2009 - 05:02 PM

I have a few Dreamweaver web pages out on the internet and try as I might to get them to fit all resolutions, I find that elements shift left and right with different resolutions. Is there a way to set them to always show centered no matter what the user's resolution is?
0

#2 User is offline   Demonslay 

  • P2L Jedi
  • PipPipPip
  • Group: Members
  • posts 973
  • Joined: 30-December 05
  • Gender:Male
  • Location:A strange world where water falls out of the sky... for no reason.
  • Interests:Graphic Design, Coding, Splinter Cell, Cats

Posted 02 November 2009 - 08:16 PM

Depends on how your layout is set, but this is how I usually do it.


HTML:
<div id="container">
<!-- All my page here -->
</div>

CSS Rule:
div#container{
margin: 0 auto;
width: 800px; // Or however big your content needs to be if it isn't to be fully flexible
}

If its a fluid layout you need, to stretch the whole page, you might have to play with it a bit. I've not made a layout of that kind in a long time, so I don't really remember how exactly, but it would have to do with floats and percentage widths that can get complicated when it comes to cross-browser compatibility (thanks to IE of course...).
0

Share this topic:


  • You cannot start a new topic
  • You cannot reply to this topic

0 user(s) are reading this topic
members, guests, anonymous users