Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Feb 2014
    Posts
    114
    Thanks
    32
    Thanked 0 Times in 0 Posts

    Breaking out of a container?

    Hello

    I am trying to centre an 'Invalid password' message which, at present, is on the left-hand side of my screen. The text I have seems to be constrained by a #container that I don't know how to break free from. You can see the 'Invalid message' here
    Login Page.

    I have centred the message as follows:

    Code:
    CSS:
    
    <style type="text/css">
    
    .center
     {
     margin-left:auto;
     margin-right:auto;
     width:70%;
     color:#BD2CBB;
     }
    </style>
    
    HTML:
    
    <div class="center">
    <p>Invalid password<br>
    Click <a href="password1.asp">here</a> to request your password</p>
    </div>
    There is also a style-sheet: "css/style1.css"

    How is it best to 'escape' the attributes of that style-sheet so that I can centre the 'Invalid password' message?

    Thank you for your time.

  • #2
    Regular Coder
    Join Date
    Feb 2014
    Posts
    114
    Thanks
    32
    Thanked 0 Times in 0 Posts

    Container restrictions

    How might I break out of the CSS container, please, so that I can centre the error 'Invalid password' message here:

    Login Page

    Thanks for any advice.

  • #3
    New Coder
    Join Date
    Dec 2013
    Location
    Were my backpack is!
    Posts
    20
    Thanks
    3
    Thanked 0 Times in 0 Posts
    The problem is just that your button is right indented in its own div that was already in the center.

    #loginButton {
    right: 50%;
    }

  • #4
    Regular Coder
    Join Date
    Feb 2014
    Posts
    114
    Thanks
    32
    Thanked 0 Times in 0 Posts
    Hello Adrian

    Thanks for your message.

    Do you mean this:

    Code:
    #loginButton { 
    
        display:inline-block;
        float:right;
        background:#d2e0ea url(../images/buttonbg.png) repeat-x; 
        border:1px solid #899caa; 
        border-radius:3px;
        -moz-border-radius:3px;
        position:relative;
        z-index:30;
        cursor:pointer;
    }
    Thank you - so, how would I change that so that the text is centred?

    Cheers


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •