W3C home > Mailing lists > Public > www-amaya@w3.org > April to June 2005

centering a horizontal rule

From: <ve3ll@rac.ca>
Date: Sun, 01 May 2005 12:36:34 -0400
To: www-amaya@w3.org
Message-ID: <4274CD52.4222.E91A3D@localhost>

illustrates a problem with horizontal rule 
centering using auto margins

first two are not centering, last one does center
cuz it is nested in a div.....

but the rule works for a very simple case such as:

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>Rule Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
hr {width:80%;text-align:center;margin:auto;
    margin-top:10px;margin-bottom:10px;border:1px solid black}
<hr />
John Russell, VE3LL@RAC.CA
Received on Sunday, 1 May 2005 16:36:38 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:53:33 UTC