Pixel2Life Forum: CSS Positioning problems when resizing (restoring down) the browser window - Programming and General Web Design - Pixel2Life Forum

Jump to content

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

CSS Positioning problems when resizing (restoring down) the browser window

Array

#1 User is offline   Emre 

  • Young Padawan
  • Pip
  • Group: Members
  • posts 2
  • Joined: 02-June 11

Posted 02 June 2011 - 08:59 AM

Hey guys,

I'm new to both CSS and pixel2life forums (although I've been pixel2life tutorials for years now with photoshop) and was hoping someone could help me out with a problem Im having. I've been playing around and reading about html and CSS and decided to make my own website. Everything was going well until I decided to play around with the size of the browser window. Basically, the format of the website squeezes and I don't know how to approach the problem.

My goal is to achieve the same type of positioning as pixel2life has. I would like the main content of the website to stay central if the browser window is big enough. If not, I would like the left end of the "central content section" to stay at the very left of the browser window. I can imagine my explanation being confusing but it might be easier to simple resize the browser window with pixel2life.com and see how the site stays central and if too small, the left end of the main content section stays on the left side of the window.

I didn't know if I had to paste the entire code in here so, I uploaded it as attachment. All help is appreciated.

Thanks in advance.

P.S. Let me know if it would be easier if i posted the background images too to make it visual.

Attached Files


0

#2 User is offline   rc69 

  • PHP Master PD
  • PipPipPipPip
  • Group: P2L Staff
  • posts 3,827
  • Joined: 26-September 04
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 02 June 2011 - 08:10 PM

The issue you're seeing is the age old one of fixed width vs. fluid layouts. If you search around a bit, you will find plenty of resources explaining the problem and usual solutions. To achieve the same fixed width effect of p2l you typically just need to wrap everything inside your <body> with another <div> and give that div your desired width.

:yodasearch:
0

#3 User is offline   Emre 

  • Young Padawan
  • Pip
  • Group: Members
  • posts 2
  • Joined: 02-June 11

Posted 04 June 2011 - 07:06 AM

Ok thanks, Ive been trying out all sorts of solutions and although I found one, I'm not sure as to how correct it is. Nonetheless thanks.
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