Results 1 to 3 of 3

Thread: Switchcontent and Firefox alignment problem.

  1. #1
    Join Date
    Jan 2005
    Location
    London
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Switchcontent and Firefox alignment problem.

    1) Script Title: switchcontent

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...tchcontent.htm

    3) Describe problem: Using switchcontent to hide menu ( vertical column style) / and Firefox
    See: http://www.luz-info.com/indexfox.htm for an example of the 'problem'

    I've had a good look around the forums for both CSS and Firefox, but am still unable to resolve my problem.
    The link above is to a stripped down version of one of my pages with the stylesheet moved back into the html document to demonstate the 'problem'.

    First of all I have used the switchcontent script from its very begining and it has served its purpose pefectly, doing everything I wanted it to, or so I thought......
    Until I had a 'complaint' about my sites incompatability with Firefox.
    Yes, I did develop the site in MS using F'page / Expression and I.E. and for 3years I've lived in ignorance thinking all was well.

    I'm sure its not Switchcontent's script at fault but it does cause my problem.

    My page has a left column vertical menu which can be shown / hidden by the switchcontent script by clicking on the red / blue text. I think it looks and works great in I.E. but have found in F/Fox & Opera the right column always sits below the left, not alongside.
    In order for the main content ( right column ) to expand when the menu (left column ) is collapsed I've had to make its width:auto, as a fixed width defeats the object if the page does not take up the space used by the menu when it has been collapsed.

    By specifying a fixed width for the right column I can make it peform partially correctly in F/Fox but it leaves an empty column space when the menu is collapsed. No good for me.
    I've tried everything I can think of, floating left and right clearing l/r and both, margins and alignments but failed.
    Can anyone help please?

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    I'm not certain where you place the width, but have a try on this part:
    Code:
    div#content{
    	float: left;
    	display: inline;
    	width: auto;
    	margin: 0 15px 10px 15px;
    	width:720px;
    }
    See if it helps.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  3. #3
    Join Date
    Jan 2005
    Location
    London
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the quick reply rangana.
    Your suggestion only highlights the problem I'm facing.
    If you set a fixed width to the right column (#content) it will not expand to take up the space left by the left column (#sidebar) when it it is collapsed.
    Your suggestion leaves a space (equiv to the left column width ) to the right of the #content column (because its floated left). Float it right and the empty space is to the left of the #content column. So the auto setting seems to be the only way to make the right column dynamicaly expand as necessary.
    Thanks for the input anyway.

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
  •