SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Guru sowen's Avatar
    Join Date
    Feb 2001
    Location
    Stockport, UK
    Posts
    729
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have created a no-table (almost ) design for a page. Due to the nature of the content I have based it around a 800x600 positive liquid layout. It looks OK right up to 1600 x 1200 but at 640 x 400 it looks like a dogs breakfast!

    Is there anyway using CSS to stop the design being liquid below 800x600 and have a horizontal scroll bar appear instead.

    I know this is not the ideal solution but taking into account the nature of the content I am taking an educated guess that the vast majority of visitors will be viewing at 800x600+ resolution.

    Here is the page;

    http://www.dotcdr.com/divtest/divtest.htm

    Ta!

  2. #2
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try using one table set to the desired width. Or you could try placing another DIV there that contains a 1 pixel GIF set to the desired width.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  3. #3
    SitePoint Enthusiast smirk's Avatar
    Join Date
    Dec 2000
    Location
    gibraltar ... for now...
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I find that when I use the position: absolute

    style tag, the stuff gets mushed together..

    Look at my page for example: (my table free page.. first one.. yay!)

    http://212.120.255.141/web_sites/css-test/index2.html

    The only thing I use postion:absolute is the box, when you shrink it down to a small size, it will overlap because its been positioned absolutely. (i'm just playing around with the box for now, it will probably be removed later)

    The way I see it, with your site, maybe set widths as percentages, like in my css, and column out from there, sort of like when you do a frame page.

    I think that made sense....


    <---- WhatEver
    ---> pFFt


  4. #4
    SitePoint Guru sowen's Avatar
    Join Date
    Feb 2001
    Location
    Stockport, UK
    Posts
    729
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think I have found a reasonably elegant solution. By fixing the width of the content div (thanks creole for lighting that fire ) the right hand menu now folds under at 680 x 400 so all I need do is detect 680 x 400 and pop in a drop down menu with js.

    Next question! - Is there any way of detecting what size the client window is, i.e. res could be 1024 x 768 but the client window might not be maximised.

    Ta all

  5. #5
    Bimbo With A Brain! silver trophy Saz's Avatar
    Join Date
    Mar 2001
    Location
    Kent, United Kingdom
    Posts
    5,275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmmmn....that's a very valid point Sowen. I run with 1024x768 but never browse full screen.
    Saz: Naturally Blonde, Naturally Dizzy!
    No longer Editor of the Community Crier.

    Don't mind me, I'm having a BLONDE moment!

  6. #6
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sowen...

    I don't think you can detect the actual size of the window. Would be cool if you could. Let me know if you ever get it figured out.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  7. #7
    SitePoint Guru sowen's Avatar
    Join Date
    Feb 2001
    Location
    Stockport, UK
    Posts
    729
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No problem mate, but I have a feeling it will take someone far wiser than I to work that one out

  8. #8
    will code HTML for food Michel V's Avatar
    Join Date
    Sep 2000
    Location
    Corsica
    Posts
    552
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I used to dig into Hotscripts's pile of Javascript snippets and found one that detected the browser window's width: I don't remember where the script was so you'll have to search, but it's just to tell you it exists
    [blogger: zengun] [blogware contributor: wordpress]

  9. #9
    SitePoint Guru sowen's Avatar
    Join Date
    Feb 2001
    Location
    Stockport, UK
    Posts
    729
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I shall grab my magnifying glass and deerstalker and go hunting for tastie little javascripts!

    Ta Shin Ma

  10. #10
    I am the night... bman's Avatar
    Join Date
    Mar 2001
    Location
    In a van... down by the river.
    Posts
    366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    to detect width of window

    for IE --
    document.body.clientWidth

    for ns --
    window.innerWidth


    not sure how far back they go thought, i think they at least work for 4.0 and above browsers, but i am not positive about that.
    Some say the world will end in fire, Some say in ice.
    From what I've tasted of desire
    I hold with those who favor fire.

  11. #11
    SitePoint Guru sowen's Avatar
    Join Date
    Feb 2001
    Location
    Stockport, UK
    Posts
    729
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    bman

    Cheers mate, just this minute found the ref for document.body.clientWidth on msdn (some really good stuff there) but I was stuck with netscape so ta a lot.

    HERE is the link for all the DHTML stuff at MSDN if anyone wants it.


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
  •