Skip to main content
Inspiring
March 19, 2017
Answered

Centering a Div does not show right on iPad

  • March 19, 2017
  • 3 replies
  • 3260 views

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 has been closed for replies.
    Correct answer Koen2

    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

    3 replies

    Koen2AuthorCorrect answer
    Inspiring
    March 22, 2017

    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

    Koen2Author
    Inspiring
    March 19, 2017

    Hi Ben

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

    BenPleysier
    Community Expert
    Community Expert
    March 19, 2017

    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

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    Koen2Author
    Inspiring
    March 19, 2017

    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

    BenPleysier
    Community Expert
    Community Expert
    March 19, 2017

    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;

    }

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    Koen2Author
    Inspiring
    March 19, 2017

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

    Cheers

    Koen