Image does not centre in preview

For technical support for all editions of CSE HTML Validator. Includes bug reports.

Image does not centre in preview

Postby Tode » Mon Feb 07, 2005 8:37 am

I've tried various ways to centre an image which is not in a table but none of them seem to work in the preview window.
For example, defining a centre style and applying it to a <p>:
Code: Select all
 
defined in style section in head:
.cent
    {
    text-align:center;
    margin-top:0px;
    margin-bottom:0px;
    padding:0px;
    }
...
<p class="cent"><img  (etc.) ...></p>

This doesn't work in the preview window although it works in both Mozilla and IE6 and looks valid to me.
Tode
Tode
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 8
Joined: Wed Feb 02, 2005 5:30 pm
Location: London

Postby Albert Wiersch » Mon Feb 07, 2005 9:48 am

Hello Tode,

The integrated web browser uses the same engine as IE so if it works in IE, then it should work in the integrated web browser.

I created the following test document and the image did display in the center in the preview browser:

Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
   <title>Test</title>
   <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <meta name="generator" content="CSE HTML Validator Professional (http://www.htmlvalidator.com/)">
<style type="text/css"><!--
.cent
    {
    text-align:center;
    margin-top:0px;
    margin-bottom:0px;
    padding:0px;
    }
--></style>
</head>
<body>
<p class="cent"><img src="http://www.htmlvalidator.com/jpg/box/box4_150.jpg"></p>
</body>
</html>


Please try the above and let me know if it works. I'd be surprised if it doesn't work. By the way, it was tested with IE 6.0 installed.
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2361
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX

Postby Tode » Mon Feb 07, 2005 10:33 am

Sorry! I forgot that you have to press the preview button on the inbuilt browser, i.e., when you close the browser window its temporary page remains open. I think I must have been looking at an old preview.
Thanks for checking.
Tode
Tode
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 8
Joined: Wed Feb 02, 2005 5:30 pm
Location: London


Return to CSE Tech Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron