I have a page with a pair of pictures side by side and a caption under each on the same line. To align the caption under the right hand picture I used:
Caption1 <SPAN style="margin-left: 200px">Caption2</SPAN>
This achieved the effect I wanted and worked in IE5.5 and tested ok in Mozilla. Then a friend said it looked wrong, there was no gap between the captions (IE6?). What should I be doing for browser compatibility ?Could you post a link to the page, please? Sometimes it's just the fact that you need to add something like position:relative to it... Other times it's not. Depends on how you're laying out your page.
JonaThe page in question is at <!-- w --><a class="postlink" href="http://www.zantehols.co.uk/zantepix.html">www.zantehols.co.uk/zantepix.html</a><!-- w --> (<!-- m --><a class="postlink" href="http://www.zantehols.co.uk/zantepix.html">http://www.zantehols.co.uk/zantepix.html</a><!-- m -->)I don't see anything wrong with it, and I'm using IE6, but I would go about doing it differently. I would put each image inside of a DIV with the caption beneath it. As such:
<DIV id="imgDiv1">
<img src=http://www.webdeveloper.com/forum/archive/index.php/"file1.jpg"><br>
<span class="myClass">Caption</span>
</div>
JonaThanks Jona, I had a feeling some sort of container would be required. No problem!
Jona
Caption1 <SPAN style="margin-left: 200px">Caption2</SPAN>
This achieved the effect I wanted and worked in IE5.5 and tested ok in Mozilla. Then a friend said it looked wrong, there was no gap between the captions (IE6?). What should I be doing for browser compatibility ?Could you post a link to the page, please? Sometimes it's just the fact that you need to add something like position:relative to it... Other times it's not. Depends on how you're laying out your page.
JonaThe page in question is at <!-- w --><a class="postlink" href="http://www.zantehols.co.uk/zantepix.html">www.zantehols.co.uk/zantepix.html</a><!-- w --> (<!-- m --><a class="postlink" href="http://www.zantehols.co.uk/zantepix.html">http://www.zantehols.co.uk/zantepix.html</a><!-- m -->)I don't see anything wrong with it, and I'm using IE6, but I would go about doing it differently. I would put each image inside of a DIV with the caption beneath it. As such:
<DIV id="imgDiv1">
<img src=http://www.webdeveloper.com/forum/archive/index.php/"file1.jpg"><br>
<span class="myClass">Caption</span>
</div>
JonaThanks Jona, I had a feeling some sort of container would be required. No problem!
Jona