Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Fixed Top-bar and Problem I am facing

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #45072
    dazdseg
    Member

    I have a fixed top-bar in a website and a sequence of images follows it. My menu bar is covering a portion of content . How can I avoid it ?
    I have tried doing this using javascript but couldn’t achieve the desired result. The following code lines I have been using :
    var imgTop;
    imgTop = document.getElementById(“em”).style.top;
    imgTop = imgTop – document.getElementById(“header”).style.height;
    window.scrollTo(0, imgTop);

    Am I doing this right ? Is there any other alternative to it ??

    #136372
    Paulie_D
    Member

    Link?

    #136427
    dazdseg
    Member
    #136454
    Paulie_D
    Member

    This isn’t a reduced test case. It’s full of broken images, unecessary markup and styles.

    Plus, you mix both external CSS and inline-styles, making impossible for anyone to read something like this.

    Please, make a pen describing your issue and only your issue. Not your whole site.

    #136519
    dazdseg
    Member

    can u kindly check http://www.am2pm.asia/test1. (I am facing 2 major problems with it) this is a strictly mobile website.
    I am making a vertical website, which contains 8 images, aligned one after another. At the end of the screen I have up & down buttons (fixed) on the screen.

    I need to do below thing with the script, and I am not sure how I can do it; any help or guidance will be appreciated.
    When a user clicks on the up or down arrow the script will do the below things:
    click (),
    check mouse position on the screen,
    depending upon the position on the screen. (this will let me know which image the user is on, so that i can guide the user to next image),
    move up to the next image.
    Whenever I try loading my website on mobile, my first image crawls down under the fixed top bar (menu bar). What I want is to stop that somehow. After this, I also want to add the functionality, this new script will take the starting position of all the images and save them different variables. When the up or down arrow are clicked (comparing the mouse actual position) with what I have stored earlier, will take user to that particular page.

    #136548
    dazdseg
    Member

    My questions: 1) when i use (MENU) – button (a li that i have made in the top bar) – the 1_4.jpg, image crawls under the fixed menu tab. (i need to stop it because thats leading to cutting of the image from top.) 2) how can i use below fixed arrows (up and down) to scroll between different images, i have made a jquery but its not working properly. any ideas how?

    #136549
    dazdseg
    Member

    kindly check my first fiddle – [jsfiddle.net/dazdseg/MFEJr](jsfiddle.net/dazdseg/MFEJr “jsfiddle.net/dazdseg/MFEJr”)

    My questions: 1) when i use (MENU) – button (a li that i have made in the top bar) – the 1_4.jpg, image crawls under the fixed menu tab. (i need to stop it because thats leading to cutting of the image from top.) 2) how can i use below fixed arrows (up and down) to scroll between different images, i have made a jquery but its not working properly. any ideas how?

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘CSS’ is closed to new topics and replies.