sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    X-UA-Compatible meta tag changes image button position.

    Scheduled Pinned Locked Moved Developers' Forum
    6 Posts 4 Posters 717 Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • renderizaR Offline
      renderiza
      last edited by

      If I use this on html for web dialog... <meta http-equiv="X-UA-Compatible" content="IE=10">

      The image I am trying to use on button is not centered anymore...why?...How can I fix this problem?

      Note: Button code: <button type="next" style="width:30px;height:30px;" id="click" value="next" onclick="next = '1'"><img src="images/next.png" alt="next"></button>

      Thanks!

      [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

      1 Reply Last reply Reply Quote 0
      • renderizaR Offline
        renderiza
        last edited by

        Adding this helped...padding:0

        Button code: <button type="next" style="width:30px;height:30px; padding:0" id="click" value="next" onclick="next = '1'"><img src="images/next.png" alt="next"></button>

        Thanks!

        [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

        1 Reply Last reply Reply Quote 0
        • A Offline
          Aerilius
          last edited by

          Native buttons have a default padding (and margin etc.) that depends on the user interface theme. Once you override such a property (like padding: 0) the button can't be rendered anymore using the theme, and it won't look native anymore. Because of that it is not a good idea to use pixel dimensions when you design dynamic interfaces that are influenced for example by the user's default fonts/sizes/buttons.
          Use only pixel dimensions if you have control over all dimensions (or specify all sizes and fonts).

          <button type="next" id="click" value="next" onclick="next = '1'"><img src="images/next.png" alt="next"></button> without width/height works fine for me. If you needed the width to align it correctly, you can use container elements instead to align all child elements horizontally/vertically or whatever.

          1 Reply Last reply Reply Quote 0
          • jolranJ Offline
            jolran
            last edited by

            Can't one do a CSS reset at the begining of the css file to accomodate for that ?

            If using Jquery it might be good idea to stick with pixel dimensioning, no ?
            Since Jquery calculates most stuff based on pixels..

            edit:

            @unknownuser said:

            the button can't be rendered anymore using the theme, and it won't look native anymore

            Ah, oh yeah I see your Point. And you're only referring to font-size regarding em-size?

            1 Reply Last reply Reply Quote 0
            • tt_suT Offline
              tt_su
              last edited by

              @renderiza said:

              The image I am trying to use on button is not centered anymore...why?...How can I fix this problem?

              The META tag will kick IE into rendering in standard mode, meaning the box model and much more will work more reliable like the rest of the browsers. That means you need to adjust some of the positioning code you use.

              Exactly what code to use depend on the scenario and layout you have. Got a small snippet?

              1 Reply Last reply Reply Quote 0
              • renderizaR Offline
                renderiza
                last edited by

                @aerilius said:

                Once you override such a property (like padding: 0) the button can't be rendered anymore using the theme, and it won't look native anymore.

                I noticed that before using paddin:0 the button had a gloss effect on the button. 😕

                @aerilius said:

                without width/height works fine for me.

                I tried this and it does center the button image but then the button is too big.

                @tt_su said:

                Exactly what code to use depend on the scenario and layout you have. Got a small snippet?

                http://sketchucation.com/resources/pluginstore?pln=RND_KeyScene
                The .html file is inside the "RND_Keyscene" folder...its called "rnd_keyscene.html"

                Note: Using the paddin:0 worked ok even though that will mess the theme used for button but I can deal with that.

                Thanks!

                [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Buy SketchPlus
                Buy SUbD
                Buy WrapR
                Buy eBook
                Buy Modelur
                Buy Vertex Tools
                Buy SketchCuisine
                Buy FormFonts

                Advertisement