Fokke Nauta
Usenet Archive
- Joined
- May 29, 2004
- Messages
- 130
- Reaction score
- 0
Hi all,
I want to have a picture horizontally centered on a web page.
This is the code I used:
<div class="pic">
<p align="center">
<img src="picture.jpg" width="200" height="255" border="1"><br> <span id="k">Some tekst here</span> </p> </div>
This is in the header:
<style type="text/css">
..pic {
float: none;
height: 265px;
width: 200px;
position:relative;
margin: auto;
}
</style>
The ID "k" is specified in an external style sheet.
In all browsers but IE9 the picture is neatly in the middle of the page with the text underneath. In IE9 it's at the left side. How can I make this appear in IE9 in the middle as well? And what about IE 10 and newer? Will it also show it at the left side?
Thanks for your answers.
Fokke Nauta
I want to have a picture horizontally centered on a web page.
This is the code I used:
<div class="pic">
<p align="center">
<img src="picture.jpg" width="200" height="255" border="1"><br> <span id="k">Some tekst here</span> </p> </div>
This is in the header:
<style type="text/css">
..pic {
float: none;
height: 265px;
width: 200px;
position:relative;
margin: auto;
}
</style>
The ID "k" is specified in an external style sheet.
In all browsers but IE9 the picture is neatly in the middle of the page with the text underneath. In IE9 it's at the left side. How can I make this appear in IE9 in the middle as well? And what about IE 10 and newer? Will it also show it at the left side?
Thanks for your answers.
Fokke Nauta