Jump to content


Photo

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


  • Please log in to reply
2 replies to this topic

#1 Emre

Emre

    Young Padawan

  • Members
  • Pip
  • 2 posts

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



#2 rc69

rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • 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:

#3 Emre

Emre

    Young Padawan

  • Members
  • Pip
  • 2 posts

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 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users