Forums

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

Home Forums CSS top is not working

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #33517
    rvkhakhkhar
    Member












    slk - index





    now left property of the div is working but the top is not working.
    I have to run this page in mobile browser…

    #83638
    Rob MacKay
    Participant

    Pardon?

    Firstly what are you trying to do – what do you want it to do. Don’t expect people to answer if you don’t give full and proper information.

    Please expand on what you want help with.

    #83639
    chrisburton
    Participant

    Also, why are you using inline styling over adding it to your stylesheet?

    #83651
    furrball1383
    Member

    i believe he is having problems getting the div to position in the window using the property top and specifying the amount. He said so in the title I do not understand why he felt the need to specify that it is for a mobile browser when he hasn’t provided any other details, but that is the basic outline of his problem.

    #83781
    rvkhakhkhar
    Member

    Sorry, if i am unable to communicate.
    Actually, I’m getting absolute top-left positions(with height-width) in pixels of the elements from front-end.(with reference 400*400 resolution)
    My job is to convert this positions in such a way that (i hope in percentage) so that it works on every mobile browser.
    Please tell if you need further information.

    #83783

    change the body to relative and your div to absolute;

    remember that the element you want to position with “top and left/right” must be absolute and the element you want to refer to must be relative

    #83788
    rvkhakhkhar
    Member

    @KarimCossutti ..yes..it’s working
    but the problem is that when the content of the div flowing out of the specified height in smaller devices, due to absolute positions, elements overlaps each other. what to do now??

    #83790

    what about media queries?

    #83791
    rvkhakhkhar
    Member

    @KarimCossutti : how it will help me in maintaining relative distance of elements which are positioned absolutely.???
    If you have any such media query please specify??

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