Results 1 to 6 of 6

Thread: Gap appears between footer and background image

  1. #1
    Join Date
    Jul 2009

    Gap appears between footer and background image

    On my website www.cherrietestingwebsite.com on the all the pages with the exception of the homepage there is gap between my background image and the footer, which I can't get rid of, does anyone know what is causing the problem?


  2. #2
    Join Date
    Feb 2008
    NW Washington State
    I don't really see any gaps between the image and the footer, even on those other pages. but reviewing the code, the <div> structure seems off.
    Oh, and first, the DOCTYPE declaration is not on the very first line, instead you have:
    <?xml version="1.0" encoding="UTF-8"?>
    DOCTYPE info here:
    Very important to get this right, since the DOCTYPE is howthe browser knows which set of rules to apply when parsing the page.
    Now the <div> structure... there is GREAT commenting on the page:
    but your <div> structure does not follow the comments. For example, comment says:
    But there is no opening or closing div for the image container.
    And at the bottom:
    but there is no closing div tag (</div>).
    So if the DOCTYPE is off and there are mismatched <div> tags (that is, not an open and close tag as a pair), the page layout can be way off.
    For your review:
    It's good practice when coding to put in the closing tag to any element as soon as you finish the opening tag.
    So for example, put in your opening #wrapper tag and then put in the closing #wrapper tag before you put anything in #wrapper.
    Now if you are using #wrapper in the normal way... that is to "wrap" all the content.... then everything... all content needs to be placed between the opening #wrapper tag and the closing #wrapper tag.
    Now as you add content to the main, all encompassing wrapper <div>, indent each level of nesting. So when you nest one level deep, indent the code so you can visually see what content in inside what. Next level of nesting gets indented one more time.
    That practice, along with always adding the closing tag a couple of lines below the opening tag at the same time the opening tag is created, will help you keep content in the proper container element and eliminate extra opening or closing tags...... always crate them in pairs.
    PS: After trying to decypher the <div> structure of another post, let me add one thing to "always create <div> tags in pairs... an opening and closing".... Add a comment right before the closing tag to remind you which <div> you are closing... like this:
    <!-- close wrapper -->
    That sure helps when trouble shooting later.
    Best wishes,
    Eye for Video

  3. #3
    Join Date
    Jul 2009


    Thanks for your help, I sorted all my coding and it now all validates to xhtml strict apart from the fact there is one error on the homepage, as I have used Jquery but I don't know how to get around this at all, am not sure if you can. Thankfully the problems with the cross-browsers have now gone. I was wanting to put text over the background image, I have looked at some tutorials, what is the easiest way to achieve this? Once again many thanks.

  4. #4
    Join Date
    Feb 2008
    NW Washington State
    Well background images have a special meaning when talking about CSS. A <div> background image is not counted as content so you can use an image as the "background" and still add regular old text as the content of a <div>.
    So first, give each section that you want to have a background image a unique name... you can't call them all
    <div id="contentholder">
    make it
    <div id="contentholder_aboutus">
    etc. and then use the background image property... for example:
    Since the home page has more than a single image, to place text over the top of the slideshow images, you'll need to position a separate <div> stacked on top of those images using the css property z-indexing:
    z-indexing must be used with a declared position... which can be a little tricky until you understand the "Parent rule", so study this topic well.
    For review:
    Best wishes,
    Eye for Video

  5. #5
    Join Date
    Jul 2009
    Yeah thanks for your help, I have carried out the advice you gave regarding the background images on the about us page and it works fine, however the only problem is the text creates a black gap at the top between the image and the navigation bar, the more text you type the bigger the gap gets. It happens across all the browsers too?

  6. #6
    Join Date
    Feb 2008
    NW Washington State
    By default paragraphs <p> have a top and bottom margin... so there is always space above & below the paragraph.
    {color: #ffffff;
    font-size: 18px;
    padding-left: 10px;
    padding-top: 30px;
    In your CSS you are using a 30 pixel top padding....so that plus the default top margin are pushing the container with the text in it down a little, exposing the black background.
    So give the <p> a
    margin-top: 0px;
    and that should take care of it.
    Best wishes,
    Eye for video

Thread Information

Users Browsing this Thread

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

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.11669 seconds
  • Memory Usage 2,899KB
  • Queries Executed 15 (?)
More Information
Template Usage (34):
  • (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
  • (10)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (6)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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 (72):
  • 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_postinfo_query
  • fetch_postinfo
  • 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_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