Results 1 to 12 of 12

Thread: Anchor partway down a large image

  1. #1
    Join Date
    Sep 2012

    Anchor partway down a large image

    I知 working on my first website ever;


    You may think my gigantic image at the top is unusual, but my design would be more practical if I was able to implement this;

    I am trying to figure out a way to have my internal links load the pages starting partway down the large image at the top. I知 trying to get my site to behave as if there was an anchor a little more than halfway down the shield image, a few pixels above the word Barbaric. Right now I have anchors on the very first text on every page, but I don稚 want to skip over the big image entirely. And I also don稚 want to always make the user scroll down all the way from the top to get to the text. I want to raise the anchors about 540 pixels upward, or do something else to that effect. Is this possible? I tried inserting a named anchor into a hotspot in Dreamweaver, and the site pretty much imploded. Yes, I知 quite new to web development.

    Thanks in advance.

  2. #2
    Join Date
    Nov 2006
    You can use a named anchor on each web page <a name="textstart"></a> right below the image:
    <img id="Image1" src="http://barbaricsoftworks.com/bigPicture.jpg" alt="" usemap="#Map">
    <a name="textstart"></a>
    You can then add the #textstart to the url of your internal links:
    <a href="http://warlordandchieftain.tumblr.com/#textstart" target="_top" class="bc_feedwebsitelink" style="text-decoration: none;"><h4 id="feedtitle" style="margin-top: 0px; display: none"><span class="bc_feedtitle">Barbaric Softworks</span></h4></a>

    Unfortunately you have no way of raising the named anchors halfway down the shield image using just HTML as shown above. You can use

    <body onload="window.scrollTo(0, 540)" > or just add window.scrollTo(0, 540); as the first statement in your init() function.
    To make your script usable for the entire site, move your javaScript (below) to an external file so you won't have to paste the same code over and over to each page.

    var preloads=[];
    var domain='http://barbaricsoftworks.com/';

    function preload(){
    for(var i=0;i<arguments.length;i++) {
    preloads[preloads.length]=new Image();


    function init(){
    window.scrollTo(0, 540);
    for(c=0;c<ars.length;c++) {
    ars[c].onmouseover=function() {
    this.onmouseout=function() {

    window.addEventListener? window.addEventListener('load',init,false):window.attachEvent('onload',init);

  3. #3
    Join Date
    Sep 2012
    Thanks, holyhttp; window.scrollTo() was exactly what I was looking for.

  4. #4
    Join Date
    Mar 2012
    This is not a reply to your query, I just thought you might be interested to see how the load time of the site could be improved by optimising the very impressive (but rather large) graphics. I've had to optimise more aggressively than I normally would to get the 500 KByte+ originals down to under 100 KBytes (the attachment limit here) but I think they are surprisingly good, considering they are a fifth the file size!
    Attached Images Attached Images

  5. #5
    Join Date
    Mar 2012
    And the last one..
    Attached Images Attached Images

  6. #6
    Join Date
    Mar 2009
    thats gr8 how do you optimize those images ? which tool you are using. i ve used PHP GD library to optimize some images on the fly.

  7. #7
    Join Date
    Mar 2012
    I used a rather ancient copy of Fireworks MX. First I chose the image with the largest file size and did test compressions from 80 % to 10% at 10% intervals. I immediately eliminated those from 40% downwards on quality grounds. Also 60% upwards were too large to upload, with edge sharpening, and were inferior to 50% (sharpened) without it. So I concentrated on getting the best out of the 50% to 60% range. It turned out best at 55% with edge-sharpening non-progressive. Having established that I simply applied the same compression to the other five images. So, yes, having a suitable tool is essential, but it also requires a methodical approach and attention to detail. The trick is to do A:B comparisons at 200% magnitude, with frequent reference back to the uncompressed original. The A:B comparisons were done with Microsoft Office Picture Manager, as it allows you to switch between images without losing the magnitude setting.
    Last edited by jedaisoul; 09-15-2012 at 05:14 AM.

  8. #8
    Join Date
    Sep 2012
    Are you getting load time issues? I never really tried my site out on different connections. The load time on my connection was always good, even with the high quality images.

  9. #9
    Join Date
    Mar 2012
    Connected by cable to the router, no. But using a wi-fi connection, you can watch the display scroll down. I haven't tried the 3G dongle, but I can if you wish. I have one for test purposes. I'm sure it would be chronic. You can't assume that everyone has a fast broadband connection, particularly with the growth in mobiles and tablets.

  10. #10
    Join Date
    Sep 2012
    I use a wireless router and I’m okay with the loading time on my phone’s data plan, which seems to take about two seconds on Verizon. I’m about to announce the site on Facebook, and if people find that it’s an issue for them, I’ll scale down the quality of the images to somewhere between where they are now and what you’ve posted.

  11. #11
    Join Date
    Mar 2012
    To give you an example, I have an Intel Atom powered netbook running Win7 connected by a relatively fast 3G dongle. It took 52 seconds to load your home page. And that is comparable, if not superior to many tablets. I suspect that you will need to review the load time of the site. But anyway, all the best with the launch of your site.
    Last edited by jedaisoul; 09-16-2012 at 03:34 AM.

  12. #12
    Join Date
    Sep 2012
    The discrepancy between our experiences loading the site on 3G is puzzling. Whenever I’m somewhere remote that is likely to have poor 3G coverage, I will try to replicate your findings with my Android. The reason I’m not super concerned with this issue is that the site is for a Steam game developer. Our target audience largely uses gaming PCs, cares a lot about graphics (thus my aversion to compression artifacts), and would rather die than have an inadequate internet connection. Thanks for pointing the issue out though; if more people confirm it, I’ll compress the images more.

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.12554 seconds
  • Memory Usage 2,989KB
  • Queries Executed 16 (?)
More Information
Template Usage (33):
  • (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)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (12)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (12)postbit
  • (6)postbit_attachment
  • (12)postbit_onlinestatus
  • (12)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 (75):
  • 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
  • fetch_postattach_query
  • 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
  • postbit_attachment
  • 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