SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    desperately confused about how to "freeze" divs so they don't resize with window

    Hello,

    sorry if this wil sound somewhat confusing... I've never posted to here before, but can someone help me to figure out why my "divs" keep moving in relation to the browser window? The best way to explain this is to show it..

    here is what I want:
    www.winian.us/ast/screenshot.jpg
    (also attached)

    and here is what I'm getting:
    www.winian.us/ast/home.htm
    and here is the css: www.winian.us/ast/css/ast_styles.css

    why is my "mid_col" div keep moving in response to the browser window, and why does my "intro" div text keep resizing but the border stays the same??

    Any and all help is greatly appreciated!
    ian

    ps. I'm not sure what the rules are here, but feel free to email me directly (ishou@winian.us) with answers also, as I really need to finish this template, and not sure how often I can check this post...thanks!
    Attached Images Attached Images

  2. #2
    SitePoint Wizard bronze trophy Tailslide's Avatar
    Join Date
    Feb 2006
    Location
    Bedford, UK
    Posts
    1,687
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Easiest way would probably be to stick a containing div around all your contents and then restrict the size of that to whatever you want the max width to be.
    Little Blue Plane Web Design
    Blood, Sweat & Rust - A Land Rover restoration project

  3. #3
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could also do with validating your CSS. Some of your attributes have incorrect units (e.g. x instead of px) and there's no such thing as float: bottom.

  4. #4
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi tailslide,

    thanks, I actually tried that, and I must have done something wrong, cuz it moved all my content off by the max width, but I'll do it again.

    one question though about 'restricting content to max width': if you define a "parent div" that has a width, then put your other content, including divs into that parent div... does that really mean that the content is "trapped/constrained " by the width of the parent div, like true nested tables?

    this is my main issue, cuz I thought I had done that with "col1" (see CSS), so it would contain the first 2 divs (left_col, and mid_col) but the content doesn't stay inside the div, it moves!

    does this make sense? thanks for the help!
    ian

  5. #5
    Carpe Diem = Fish of the Day fisherboy's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    488
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi winian

    Before you do anything else you MUST get your HTML and CSS validated. The width on col1 is 502x instead of 502px. Get this stuff right and wem ight be able to help.

    You also have a width issue with the items fitting into col1 as you have borders which are over and above the widths you have specified. You also have one or two positioning issues.

    None of these can be resolved until the CSS and HTML are valid.

    Good luck
    fisherboy
    Web Site Design

  6. #6
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok, I've completely re-written the css and the html, but I still can't seem to get the right column to line up...
    please help:
    www.winian.us/ast/template.htm
    www.winian.us/ast/css/styles.css

    one question: do divs "truly contain" their child divs, especially in terms of width, etc? in other words, I created a parent div (col1) that contains left_col and mid_col, so do I have to specify a width for each of those, or will it "self-divide" if I use percentages for widths? This is the same question I have for the content div, which also contains col1 and col2... in most of the tutorials I've seen out there (and I've seen MANY... maxdesign, pmob.co.uk, etc. none of them seem to specify widths and let the window resize the columns.

    I also notice none of the tutorials ever do what I'm trying to do here in that the 3rd column is actually taller than the other 2... that's my problem, and I've tried to solve it with "nested divs"...

    help!
    thank you,
    ian


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •