0

I hope you have the answer for me, I think its a silly mistake but I just can't find it! So I hope you will have a quick look at it and that you are able to help me out. I'm kinda new to this and already learnt a lot from other peoples quetions.

Here is my code:

</head>

<style type="text/css"> 

.imgA1 { position:absolute; position: absolute;
margin-left: auto;
margin-right: auto;
top: 30;
left: 0;
right: 0; z-index: -2; } 

.imgB1 {  

position:absolute; position: absolute;
margin-left: auto;
margin-right: auto;
top: 0;
left: 0;
right: 0; z-index: 2; } 

</style>

<style>

div.ex { position:absolute; position: absolute;
margin-left: auto;
margin-right: auto;
top: 30;
left: 0;
bottom:0;
right: 0; z-index: 1;

width: 800px;
padding: 0px;
border: 0px solid gray;
margin: 0px;
text-align: justify;
}
</style>

<img class=imgA1 src="images/middenstuk.png"/>

imgA1 is centred but my text box wont:

<div class="ex">Hallo
<a href="Hoeveel.html">>NEXT</a></div>

Would greatly appreciate any kind of help!

1 Answers1

0

Css property to align text.

text-align: center;

You can center images also without using absolute by using the same technique. Place an img tag in a div and in the div set its text-align:center; and all the elements within will center.

I may be off a little bit with the nesting to center, but try it and play around. You will get it.

Exzile
  • 389
  • 4
  • 15