-1
<div class="dispLoginSearch">
    <div class="theLoginBox">
        <span class="loginTitle">
            Log in to <span style="font-family: 'blackjarregular'; font-size: 14pt; color: #FE7816;">My</span> <span style="font-family: 'trajanpro'; font-size: 12pt; color: #00529B;">WD</span> | Sign Up
        </span>
    </div>
</div>

CSS:

.dispLoginSearch
{
    width: 47%;
    height: 100%;
    float: right;
    text-align: right;
    padding-right: 2%;
}
.theLoginBox
{
    border: 2px solid #D5D5D5;
    border-radius: 10px;
    width: 440px;
    height: 125px;
    float: right;
    padding: 10px;
    vertical-align: top;
}
.loginTitle
{
    font-weight: bold;
    text-align: left;
    background: #808080;
}

displays:

enter image description here

What I am looking to do is the following:

enter image description here

How can I modify my code to achieve the above where the Log in... is top left followed by the form?

SearchForKnowledge
  • 3,663
  • 9
  • 49
  • 122
  • you should start by adding your form code – Devin Aug 25 '14 at 19:56
  • possible duplicate of [vertical alignment of div inside another - issue](http://stackoverflow.com/questions/13222687/vertical-alignment-of-div-inside-another-issue) – TylerH Aug 25 '14 at 19:57
  • 2
    You literally could not have picked a more duplicated topic: http://stackoverflow.com/questions/13222687/vertical-alignment-of-div-inside-another-issue or http://stackoverflow.com/questions/22208538/aligning-div-inside-another-div or http://stackoverflow.com/questions/7572420/how-to-vertical-and-horizontal-align-a-div-inside-another-div or http://stackoverflow.com/questions/7446077/how-to-vertically-align-div-inside-another-div-without-displaytable-cell – TylerH Aug 25 '14 at 19:57
  • None of them worked for me :/ – SearchForKnowledge Aug 25 '14 at 20:02

1 Answers1

1
    .divToBeCentered{
         margin-left:auto;
         margin-right:auto;
         position:relative
     }

oh sorry... i am gonna rewrite this

here it is jsfiddle link

i.rijad
  • 36
  • 6