I am facing a challenge while attempting to center text within a modal window, despite my efforts the text remains uncentered.
This is my HTML code:
<div ng-init="modalCompassDir()">
<div class="myModal">
<img class='floorImage' src={{items}}/>
<div class="stickFigureDiv">
<img class="stickFigure" style="height:30px; width:30px;" src="NavAppPics/stick_figure.gif"/>
<img class="directionArrow" degrees='angle' rotate src='NavAppPics/transparentArrow.png' style="height:28px; width:25px;" />
</div>
</div>
<a class="address">{{address}}</a>
</div>
Here is my CSS code:
.myModal{
position:relative;
display: block;
/* height:300px;*/
width:100%;
text-align:center;
}
.address{
font-size:1.5em;
text-align: center;
/* margin-left:10%;*/
}
I cannot seem to understand why the text-align property in my CSS code is not functioning as expected, I have referred to this example for guidance: http://www.w3schools.com/cssref/pr_text_text-align.asp
Edit: I mistakenly left one of the text-align properties set to 'center', I was experimenting with different options before reverting it back