Skip to main content
Inspiring
Mar 19, 2017 7:35 AM UTC
Answered

Centering a Div does not show right on iPad

Hello all,

At the moment I have a strange thing going on.

I have created a <div> that is 1104 px wide, and is centred in this way :

#pmetxt {

  width: 1104px;

  height: auto;

  min-height: 100%;

  margin-left: -552px;

  left: 50%;

  position: absolute;

  z-index: 10;

  top: 0px;

}

When I use a browser it centres right and all content is visible.

But when I use an iPad or iPhone it als centres nice, but on the left and right side, partly of the content is cut off.

I can scroll to the right, and then I can see the rest on the right side, but not on the left side.

The link to my test page is : http://pme-tecnica.nl/test_site

Is there a way to solve this?

Cheers

Koen

    This topic is closed to new replies. Start a new post to keep the conversation going.
    Koen2Correct answer
    Inspiring
    Mar 22, 2017 7:21 AM UTC

    A lot of thanks to evryone!

    All of you gave some extra input and helped me a lot.

    The site will be (for now) created int 'the old way' but when I have mastered bootstrap a bit more, I'll transfer it.

    Thanks a lot!!

    Cheers

    Koen

    17 replies

    Koen2AuthorCorrect answer
    Inspiring
    Mar 22, 2017 7:21 AM UTC

    A lot of thanks to evryone!

    All of you gave some extra input and helped me a lot.

    The site will be (for now) created int 'the old way' but when I have mastered bootstrap a bit more, I'll transfer it.

    Thanks a lot!!

    Cheers

    Koen

    Translate
    Koen2Author
    Inspiring
    Mar 19, 2017 8:53 AM UTC

    Hi Ben

    If I remove those line, my content goes to -552 pixels, and in this case off my screen (or my div window)

    Translate
    BenPleysier
    Community Expert
    Community Expert
    Mar 19, 2017 1:17 PM UTC

    Ik wil je niet ontmoedigen, but the technique that you are using is about 10 years out of fashion.

    Have a look at this tutorial to help you on the right track How to make a website in Dreamweaver part 1, site setup | Adobe Dreamweaver CC tutorials

    Jammer van Wilders

    Translate
    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    Koen2Author
    Inspiring
    Mar 19, 2017 1:34 PM UTC

    Was ik al een beetje bang voor........

    But the thing is, is that most site are look alike. And want to try something different with (maybe old stylish) a different look. (in a way)

    So started with a Photoshop drawing and converted it to what I have setup now.

    (And I want to avoid WordPress)

    But is can this problem be solved?

    Or do I have to get back to school and find a better way?

    Cheers

    Koen

    Translate
    BenPleysier
    Community Expert
    Community Expert
    Mar 19, 2017 8:30 AM UTC

    The link does not work.

    In the meantime, have a look at deleting the crossed out parts

    #pmetxt {

      width: 1104px;

      height: auto;

      min-height: 100%;

      margin-left: -552px;

      left: 50%;

      position: absolute;

      z-index: 10;

      top: 0px;

    }

    Translate
    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    Koen2Author
    Inspiring
    Mar 19, 2017 8:37 AM UTC

    New link is : http://pme-tecnica.nl/beta/

    Cheers

    Koen

    Translate