Positioning constraints not having any effect









up vote
3
down vote

favorite












I am trying to code the label in the viewDidLoad function. The label is showing up but the code I am using now is not affecting the positioning. I am trying to code everything in the viewDidLoad function. You can see the screenshot below.



override func viewDidLoad() 
super.viewDidLoad()

let backbutton = UILabel()
backbutton.backgroundColor = UIColor.orange
backbutton.translatesAutoresizingMaskIntoConstraints = false
backbutton.widthAnchor.constraint(equalToConstant: 300).isActive = true
backbutton.heightAnchor.constraint(equalToConstant: 300).isActive = true
backbutton.centerXAnchor.constraint(equalTo: backbutton.centerXAnchor, constant: 100).isActive = true
backbutton.centerYAnchor.constraint(equalTo: backbutton.centerYAnchor, constant: 300).isActive = true
view.addSubview(backbutton)



enter image description here










share|improve this question























  • You are trying to constraint the button to its own centre. You want backbutton.centerXAnchor.constraint(equalTo: self.view.centerXAnchor, constant: 100).isActive = true and the similar thing for the Y center
    – Paulw11
    Nov 12 at 2:59










  • @Paulw11 That does not work.
    – Sam Burns
    Nov 12 at 3:41










  • @Paulw11 a runtime error occurs.
    – Sam Burns
    Nov 12 at 3:41










  • You need to add the button to its superview before you can create constraints that reference the superview
    – Paulw11
    Nov 12 at 3:44










  • before applying any constraint first add the backbutton as subview.
    – Ratul Sharker
    Nov 12 at 5:50














up vote
3
down vote

favorite












I am trying to code the label in the viewDidLoad function. The label is showing up but the code I am using now is not affecting the positioning. I am trying to code everything in the viewDidLoad function. You can see the screenshot below.



override func viewDidLoad() 
super.viewDidLoad()

let backbutton = UILabel()
backbutton.backgroundColor = UIColor.orange
backbutton.translatesAutoresizingMaskIntoConstraints = false
backbutton.widthAnchor.constraint(equalToConstant: 300).isActive = true
backbutton.heightAnchor.constraint(equalToConstant: 300).isActive = true
backbutton.centerXAnchor.constraint(equalTo: backbutton.centerXAnchor, constant: 100).isActive = true
backbutton.centerYAnchor.constraint(equalTo: backbutton.centerYAnchor, constant: 300).isActive = true
view.addSubview(backbutton)



enter image description here










share|improve this question























  • You are trying to constraint the button to its own centre. You want backbutton.centerXAnchor.constraint(equalTo: self.view.centerXAnchor, constant: 100).isActive = true and the similar thing for the Y center
    – Paulw11
    Nov 12 at 2:59










  • @Paulw11 That does not work.
    – Sam Burns
    Nov 12 at 3:41










  • @Paulw11 a runtime error occurs.
    – Sam Burns
    Nov 12 at 3:41










  • You need to add the button to its superview before you can create constraints that reference the superview
    – Paulw11
    Nov 12 at 3:44










  • before applying any constraint first add the backbutton as subview.
    – Ratul Sharker
    Nov 12 at 5:50












up vote
3
down vote

favorite









up vote
3
down vote

favorite











I am trying to code the label in the viewDidLoad function. The label is showing up but the code I am using now is not affecting the positioning. I am trying to code everything in the viewDidLoad function. You can see the screenshot below.



override func viewDidLoad() 
super.viewDidLoad()

let backbutton = UILabel()
backbutton.backgroundColor = UIColor.orange
backbutton.translatesAutoresizingMaskIntoConstraints = false
backbutton.widthAnchor.constraint(equalToConstant: 300).isActive = true
backbutton.heightAnchor.constraint(equalToConstant: 300).isActive = true
backbutton.centerXAnchor.constraint(equalTo: backbutton.centerXAnchor, constant: 100).isActive = true
backbutton.centerYAnchor.constraint(equalTo: backbutton.centerYAnchor, constant: 300).isActive = true
view.addSubview(backbutton)



enter image description here










share|improve this question















I am trying to code the label in the viewDidLoad function. The label is showing up but the code I am using now is not affecting the positioning. I am trying to code everything in the viewDidLoad function. You can see the screenshot below.



override func viewDidLoad() 
super.viewDidLoad()

let backbutton = UILabel()
backbutton.backgroundColor = UIColor.orange
backbutton.translatesAutoresizingMaskIntoConstraints = false
backbutton.widthAnchor.constraint(equalToConstant: 300).isActive = true
backbutton.heightAnchor.constraint(equalToConstant: 300).isActive = true
backbutton.centerXAnchor.constraint(equalTo: backbutton.centerXAnchor, constant: 100).isActive = true
backbutton.centerYAnchor.constraint(equalTo: backbutton.centerYAnchor, constant: 300).isActive = true
view.addSubview(backbutton)



enter image description here







ios swift constraints nslayoutconstraint






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 12 at 4:28









rmaddy

237k27308374




237k27308374










asked Nov 12 at 2:34









Sam Burns

42412




42412











  • You are trying to constraint the button to its own centre. You want backbutton.centerXAnchor.constraint(equalTo: self.view.centerXAnchor, constant: 100).isActive = true and the similar thing for the Y center
    – Paulw11
    Nov 12 at 2:59










  • @Paulw11 That does not work.
    – Sam Burns
    Nov 12 at 3:41










  • @Paulw11 a runtime error occurs.
    – Sam Burns
    Nov 12 at 3:41










  • You need to add the button to its superview before you can create constraints that reference the superview
    – Paulw11
    Nov 12 at 3:44










  • before applying any constraint first add the backbutton as subview.
    – Ratul Sharker
    Nov 12 at 5:50
















  • You are trying to constraint the button to its own centre. You want backbutton.centerXAnchor.constraint(equalTo: self.view.centerXAnchor, constant: 100).isActive = true and the similar thing for the Y center
    – Paulw11
    Nov 12 at 2:59










  • @Paulw11 That does not work.
    – Sam Burns
    Nov 12 at 3:41










  • @Paulw11 a runtime error occurs.
    – Sam Burns
    Nov 12 at 3:41










  • You need to add the button to its superview before you can create constraints that reference the superview
    – Paulw11
    Nov 12 at 3:44










  • before applying any constraint first add the backbutton as subview.
    – Ratul Sharker
    Nov 12 at 5:50















You are trying to constraint the button to its own centre. You want backbutton.centerXAnchor.constraint(equalTo: self.view.centerXAnchor, constant: 100).isActive = true and the similar thing for the Y center
– Paulw11
Nov 12 at 2:59




You are trying to constraint the button to its own centre. You want backbutton.centerXAnchor.constraint(equalTo: self.view.centerXAnchor, constant: 100).isActive = true and the similar thing for the Y center
– Paulw11
Nov 12 at 2:59












@Paulw11 That does not work.
– Sam Burns
Nov 12 at 3:41




@Paulw11 That does not work.
– Sam Burns
Nov 12 at 3:41












@Paulw11 a runtime error occurs.
– Sam Burns
Nov 12 at 3:41




@Paulw11 a runtime error occurs.
– Sam Burns
Nov 12 at 3:41












You need to add the button to its superview before you can create constraints that reference the superview
– Paulw11
Nov 12 at 3:44




You need to add the button to its superview before you can create constraints that reference the superview
– Paulw11
Nov 12 at 3:44












before applying any constraint first add the backbutton as subview.
– Ratul Sharker
Nov 12 at 5:50




before applying any constraint first add the backbutton as subview.
– Ratul Sharker
Nov 12 at 5:50












3 Answers
3






active

oldest

votes

















up vote
2
down vote



accepted










This is how you can align the label into the center of the view,



let backbutton = UILabel()
view.addSubview(backbutton)

backbutton.backgroundColor = UIColor.orange
backbutton.translatesAutoresizingMaskIntoConstraints = false
backbutton.widthAnchor.constraint(equalToConstant: 300).isActive = true
backbutton.heightAnchor.constraint(equalToConstant: 300).isActive = true
backbutton.centerXAnchor.constraint(equalTo: view.centerXAnchor, constant: 0).isActive = true
backbutton.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: 0).isActive = true


When you are setting constraints programmatically, make sure you add the view into the super/parent view before applying constraints. Secondly in the below lines, you are telling the backButton label to align its center to itself (i.e, backbutton.centerXAnchor.constraint(equalTo: backbutton.centerXAnchor).



backbutton.centerXAnchor.constraint(equalTo: backbutton.centerXAnchor, constant: 100).isActive = true
backbutton.centerYAnchor.constraint(equalTo: backbutton.centerYAnchor, constant: 300).isActive = true


As you want to align it center vertically and horizontally to its parent view so you should set the center constraints equal to parent view as below,



backbutton.centerXAnchor.constraint(equalTo: view.centerXAnchor, constant: 0).isActive = true
backbutton.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: 0).isActive = true


enter image description here






share|improve this answer





























    up vote
    1
    down vote













    Try this!!



     self.view.setNeedsUpdateConstraints()
    self.view.layoutIfNeeded()





    share|improve this answer




















    • OP added constraint in viewDidLoad, after viewDidLoad constraint already update once.
      – Ratul Sharker
      Nov 12 at 5:51











    • still that constraint not getting updated might view is not settled down. so explicitly called it.
      – Pushp
      Nov 12 at 6:03










    • My guess is that OP added constraint before adding the subview.
      – Ratul Sharker
      Nov 12 at 6:07

















    up vote
    0
    down vote













    Try using CGRect instead:



     let screenWidth = UIScreen.main.bounds.width
    let screenHeight = UIScreen.main.bounds.height
    let xPostion:CGFloat = screenWidth - 150 //150 is half of view's width
    let yPostion:CGFloat = screenHeight - 150 //150 is half of view's height
    let buttonWidth:CGFloat = 300
    let buttonHeight:CGFloat = 300
    backbutton.frame = CGRect(x:xPostion, y:yPostion, width:buttonWidth, height:buttonHeight)


    instead of screen width/height you can also try to get the width of your super view using:



     self.view.frame.width 
    self.view.frame.height





    share|improve this answer




















      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53255308%2fpositioning-constraints-not-having-any-effect%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      2
      down vote



      accepted










      This is how you can align the label into the center of the view,



      let backbutton = UILabel()
      view.addSubview(backbutton)

      backbutton.backgroundColor = UIColor.orange
      backbutton.translatesAutoresizingMaskIntoConstraints = false
      backbutton.widthAnchor.constraint(equalToConstant: 300).isActive = true
      backbutton.heightAnchor.constraint(equalToConstant: 300).isActive = true
      backbutton.centerXAnchor.constraint(equalTo: view.centerXAnchor, constant: 0).isActive = true
      backbutton.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: 0).isActive = true


      When you are setting constraints programmatically, make sure you add the view into the super/parent view before applying constraints. Secondly in the below lines, you are telling the backButton label to align its center to itself (i.e, backbutton.centerXAnchor.constraint(equalTo: backbutton.centerXAnchor).



      backbutton.centerXAnchor.constraint(equalTo: backbutton.centerXAnchor, constant: 100).isActive = true
      backbutton.centerYAnchor.constraint(equalTo: backbutton.centerYAnchor, constant: 300).isActive = true


      As you want to align it center vertically and horizontally to its parent view so you should set the center constraints equal to parent view as below,



      backbutton.centerXAnchor.constraint(equalTo: view.centerXAnchor, constant: 0).isActive = true
      backbutton.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: 0).isActive = true


      enter image description here






      share|improve this answer


























        up vote
        2
        down vote



        accepted










        This is how you can align the label into the center of the view,



        let backbutton = UILabel()
        view.addSubview(backbutton)

        backbutton.backgroundColor = UIColor.orange
        backbutton.translatesAutoresizingMaskIntoConstraints = false
        backbutton.widthAnchor.constraint(equalToConstant: 300).isActive = true
        backbutton.heightAnchor.constraint(equalToConstant: 300).isActive = true
        backbutton.centerXAnchor.constraint(equalTo: view.centerXAnchor, constant: 0).isActive = true
        backbutton.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: 0).isActive = true


        When you are setting constraints programmatically, make sure you add the view into the super/parent view before applying constraints. Secondly in the below lines, you are telling the backButton label to align its center to itself (i.e, backbutton.centerXAnchor.constraint(equalTo: backbutton.centerXAnchor).



        backbutton.centerXAnchor.constraint(equalTo: backbutton.centerXAnchor, constant: 100).isActive = true
        backbutton.centerYAnchor.constraint(equalTo: backbutton.centerYAnchor, constant: 300).isActive = true


        As you want to align it center vertically and horizontally to its parent view so you should set the center constraints equal to parent view as below,



        backbutton.centerXAnchor.constraint(equalTo: view.centerXAnchor, constant: 0).isActive = true
        backbutton.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: 0).isActive = true


        enter image description here






        share|improve this answer
























          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          This is how you can align the label into the center of the view,



          let backbutton = UILabel()
          view.addSubview(backbutton)

          backbutton.backgroundColor = UIColor.orange
          backbutton.translatesAutoresizingMaskIntoConstraints = false
          backbutton.widthAnchor.constraint(equalToConstant: 300).isActive = true
          backbutton.heightAnchor.constraint(equalToConstant: 300).isActive = true
          backbutton.centerXAnchor.constraint(equalTo: view.centerXAnchor, constant: 0).isActive = true
          backbutton.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: 0).isActive = true


          When you are setting constraints programmatically, make sure you add the view into the super/parent view before applying constraints. Secondly in the below lines, you are telling the backButton label to align its center to itself (i.e, backbutton.centerXAnchor.constraint(equalTo: backbutton.centerXAnchor).



          backbutton.centerXAnchor.constraint(equalTo: backbutton.centerXAnchor, constant: 100).isActive = true
          backbutton.centerYAnchor.constraint(equalTo: backbutton.centerYAnchor, constant: 300).isActive = true


          As you want to align it center vertically and horizontally to its parent view so you should set the center constraints equal to parent view as below,



          backbutton.centerXAnchor.constraint(equalTo: view.centerXAnchor, constant: 0).isActive = true
          backbutton.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: 0).isActive = true


          enter image description here






          share|improve this answer














          This is how you can align the label into the center of the view,



          let backbutton = UILabel()
          view.addSubview(backbutton)

          backbutton.backgroundColor = UIColor.orange
          backbutton.translatesAutoresizingMaskIntoConstraints = false
          backbutton.widthAnchor.constraint(equalToConstant: 300).isActive = true
          backbutton.heightAnchor.constraint(equalToConstant: 300).isActive = true
          backbutton.centerXAnchor.constraint(equalTo: view.centerXAnchor, constant: 0).isActive = true
          backbutton.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: 0).isActive = true


          When you are setting constraints programmatically, make sure you add the view into the super/parent view before applying constraints. Secondly in the below lines, you are telling the backButton label to align its center to itself (i.e, backbutton.centerXAnchor.constraint(equalTo: backbutton.centerXAnchor).



          backbutton.centerXAnchor.constraint(equalTo: backbutton.centerXAnchor, constant: 100).isActive = true
          backbutton.centerYAnchor.constraint(equalTo: backbutton.centerYAnchor, constant: 300).isActive = true


          As you want to align it center vertically and horizontally to its parent view so you should set the center constraints equal to parent view as below,



          backbutton.centerXAnchor.constraint(equalTo: view.centerXAnchor, constant: 0).isActive = true
          backbutton.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: 0).isActive = true


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 12 at 7:11

























          answered Nov 12 at 4:43









          Kamran

          5,65011027




          5,65011027






















              up vote
              1
              down vote













              Try this!!



               self.view.setNeedsUpdateConstraints()
              self.view.layoutIfNeeded()





              share|improve this answer




















              • OP added constraint in viewDidLoad, after viewDidLoad constraint already update once.
                – Ratul Sharker
                Nov 12 at 5:51











              • still that constraint not getting updated might view is not settled down. so explicitly called it.
                – Pushp
                Nov 12 at 6:03










              • My guess is that OP added constraint before adding the subview.
                – Ratul Sharker
                Nov 12 at 6:07














              up vote
              1
              down vote













              Try this!!



               self.view.setNeedsUpdateConstraints()
              self.view.layoutIfNeeded()





              share|improve this answer




















              • OP added constraint in viewDidLoad, after viewDidLoad constraint already update once.
                – Ratul Sharker
                Nov 12 at 5:51











              • still that constraint not getting updated might view is not settled down. so explicitly called it.
                – Pushp
                Nov 12 at 6:03










              • My guess is that OP added constraint before adding the subview.
                – Ratul Sharker
                Nov 12 at 6:07












              up vote
              1
              down vote










              up vote
              1
              down vote









              Try this!!



               self.view.setNeedsUpdateConstraints()
              self.view.layoutIfNeeded()





              share|improve this answer












              Try this!!



               self.view.setNeedsUpdateConstraints()
              self.view.layoutIfNeeded()






              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Nov 12 at 5:01









              Pushp

              280210




              280210











              • OP added constraint in viewDidLoad, after viewDidLoad constraint already update once.
                – Ratul Sharker
                Nov 12 at 5:51











              • still that constraint not getting updated might view is not settled down. so explicitly called it.
                – Pushp
                Nov 12 at 6:03










              • My guess is that OP added constraint before adding the subview.
                – Ratul Sharker
                Nov 12 at 6:07
















              • OP added constraint in viewDidLoad, after viewDidLoad constraint already update once.
                – Ratul Sharker
                Nov 12 at 5:51











              • still that constraint not getting updated might view is not settled down. so explicitly called it.
                – Pushp
                Nov 12 at 6:03










              • My guess is that OP added constraint before adding the subview.
                – Ratul Sharker
                Nov 12 at 6:07















              OP added constraint in viewDidLoad, after viewDidLoad constraint already update once.
              – Ratul Sharker
              Nov 12 at 5:51





              OP added constraint in viewDidLoad, after viewDidLoad constraint already update once.
              – Ratul Sharker
              Nov 12 at 5:51













              still that constraint not getting updated might view is not settled down. so explicitly called it.
              – Pushp
              Nov 12 at 6:03




              still that constraint not getting updated might view is not settled down. so explicitly called it.
              – Pushp
              Nov 12 at 6:03












              My guess is that OP added constraint before adding the subview.
              – Ratul Sharker
              Nov 12 at 6:07




              My guess is that OP added constraint before adding the subview.
              – Ratul Sharker
              Nov 12 at 6:07










              up vote
              0
              down vote













              Try using CGRect instead:



               let screenWidth = UIScreen.main.bounds.width
              let screenHeight = UIScreen.main.bounds.height
              let xPostion:CGFloat = screenWidth - 150 //150 is half of view's width
              let yPostion:CGFloat = screenHeight - 150 //150 is half of view's height
              let buttonWidth:CGFloat = 300
              let buttonHeight:CGFloat = 300
              backbutton.frame = CGRect(x:xPostion, y:yPostion, width:buttonWidth, height:buttonHeight)


              instead of screen width/height you can also try to get the width of your super view using:



               self.view.frame.width 
              self.view.frame.height





              share|improve this answer
























                up vote
                0
                down vote













                Try using CGRect instead:



                 let screenWidth = UIScreen.main.bounds.width
                let screenHeight = UIScreen.main.bounds.height
                let xPostion:CGFloat = screenWidth - 150 //150 is half of view's width
                let yPostion:CGFloat = screenHeight - 150 //150 is half of view's height
                let buttonWidth:CGFloat = 300
                let buttonHeight:CGFloat = 300
                backbutton.frame = CGRect(x:xPostion, y:yPostion, width:buttonWidth, height:buttonHeight)


                instead of screen width/height you can also try to get the width of your super view using:



                 self.view.frame.width 
                self.view.frame.height





                share|improve this answer






















                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  Try using CGRect instead:



                   let screenWidth = UIScreen.main.bounds.width
                  let screenHeight = UIScreen.main.bounds.height
                  let xPostion:CGFloat = screenWidth - 150 //150 is half of view's width
                  let yPostion:CGFloat = screenHeight - 150 //150 is half of view's height
                  let buttonWidth:CGFloat = 300
                  let buttonHeight:CGFloat = 300
                  backbutton.frame = CGRect(x:xPostion, y:yPostion, width:buttonWidth, height:buttonHeight)


                  instead of screen width/height you can also try to get the width of your super view using:



                   self.view.frame.width 
                  self.view.frame.height





                  share|improve this answer












                  Try using CGRect instead:



                   let screenWidth = UIScreen.main.bounds.width
                  let screenHeight = UIScreen.main.bounds.height
                  let xPostion:CGFloat = screenWidth - 150 //150 is half of view's width
                  let yPostion:CGFloat = screenHeight - 150 //150 is half of view's height
                  let buttonWidth:CGFloat = 300
                  let buttonHeight:CGFloat = 300
                  backbutton.frame = CGRect(x:xPostion, y:yPostion, width:buttonWidth, height:buttonHeight)


                  instead of screen width/height you can also try to get the width of your super view using:



                   self.view.frame.width 
                  self.view.frame.height






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 12 at 6:35









                  Mahgol Fa

                  27414




                  27414



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53255308%2fpositioning-constraints-not-having-any-effect%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Top Tejano songwriter Luis Silva dead of heart attack at 64

                      政党

                      天津地下鉄3号線