www.webdeveloper.com
Results 1 to 4 of 4

Thread: A tricky height setting

  1. #1
    Join Date
    Jan 2009
    Posts
    24

    A tricky height setting

    Hello.

    Here is the live site which I am trying to remove all of the frames from.

    http://www.gmmstudios.com/

    Here is my Work in progress site.

    http://patrickrauland.com/gmm/

    The tricky part is that I need the content area to be as tall as the browser will allow, and then to add a scroll bar. I want to be able to always see the navigation on the left.

    I also want the nav section to show as much of the background as possible, without showing so much that it adds a scroll bar.

    How can I do this in CSS? It seems to me that if I want a scroll bar for the content section that I have to set a specific height. Is there a way of setting

  2. #2
    Join Date
    Aug 2009
    Location
    England
    Posts
    29
    I've noticed a bit of code in your stylesheet under #nav: height: 1168px;

    Try setting this to 100% first off and see what happens. You've also set the height of the #content_pane section to 500px, try setting this to *px (I forget if this is correct syntax or not though).
    I am a Freelance Developer. Please go to www.aaroncatlin.com for more information and contact details.

    NB: If I respond to you with a code snippet that doesn't quite work, I apologise. I type my responses very fast and can occasionally make a typo.

  3. #3
    Join Date
    Jan 2009
    Posts
    24
    Thanks for the quick reply. That didn't quite solve the issue.
    setting the #nav height to 100% will make that section as tall as your browser is. If the user scrolls down, there will be unfilled space.

    I tried setting the #content_pane to *px but that didn't do anything. I also tried 100% and that didn't do anything.
    Last edited by BFTrick; 08-14-2009 at 03:05 PM.

  4. #4
    Join Date
    Apr 2009
    Posts
    122
    Hi Bftrick,
    Make a copy of your style sheet and replace the style.css styles with:

    Code:
    HTML {
    	MIN-HEIGHT: 100%; height: 100%;
    }
    BODY {
    	FONT-SIZE: 12px; MIN-HEIGHT: 100%; height: 100%; overflow-y: scroll;
    }
    H3 {
    	FONT-SIZE: 18px; FONT-WEIGHT: normal
    }
    H2 {
    	FONT-SIZE: 24px
    }
    #header {
    	BACKGROUND: url(http://www.gmmstudios.com/Pictures/f...ckground.gif); HEIGHT: 83px
    }
    #nav {
    	BACKGROUND-IMAGE: url(http://www.gmmstudios.com/Pictures/F...ckground.gif); POSITION: absolute; WIDTH: 160px; TOP: 83px; LEFT: 0px
    }
    #nav TABLE TR {
    	HEIGHT: 40px
    }
    #content_pane {
    	PADDING-BOTTOM: 0px; BACKGROUND-COLOR: #00abea; PADDING-LEFT: 160px; PADDING-RIGHT: 0px; PADDING-TOP: 0px
    }
    #content-bg {
    	PADDING-BOTTOM: 10px; BACKGROUND-COLOR: white
    }
    #content {
    	PADDING-BOTTOM: 0px; PADDING-LEFT: 50px; WIDTH: 500px; PADDING-RIGHT: 0px; BACKGROUND: url(http://www.gmmstudios.com/Pictures/Background.gif) no-repeat; PADDING-TOP: 50px
    }
    #content H1 {
    	FONT-FAMILY: Impact, Haettenschweiler, Arial, "Arial Black"
    }
    #content H2 {
    	FONT-FAMILY: Impact, Haettenschweiler, Arial, "Arial Black"
    }
    #content H3 {
    	FONT-FAMILY: Impact, Haettenschweiler, Arial, "Arial Black"
    }
    #content H4 {
    	FONT-FAMILY: Impact, Haettenschweiler, Arial, "Arial Black"
    }
    #content H5 {
    	FONT-FAMILY: Impact, Haettenschweiler, Arial, "Arial Black"
    }
    #content H6 {
    	FONT-FAMILY: Impact, Haettenschweiler, Arial, "Arial Black"
    }
    #content A IMG {
    	FILTER: alpha(opacity='95'); opacity: 0.95
    }
    #content A:hover IMG {
    	FILTER: alpha(opacity='100'); opacity: 1
    }
    #page {
    	height: 100%;
    }
    What i've done is take off the height on the nav as its not needed, and told the HTML / Body to have 100% height.

    You might want to play about with this to get it just as you want, but this should hopefully help you on your way. Hope this helps
    - Andy

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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

"

"

X vBulletin 4.2.2 Debug Information

  • Page Generation 0.31504 seconds
  • Memory Usage 2,865KB
  • Queries Executed 13 (?)
More Information
Template Usage (33):
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (4)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (71):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates