parent page
#divmotto{
font-size:100%;
font-style:italic;
font-weight:bold;
float:center;
width:100%;
text-align:center;
background-color:#E4521E;
padding:0%;
clear:both;
color:#DCED8F;
margin:0%;
border:0%;
}
<div id="divmotto">my motto</div>
//page shows motto in centre of row across page
var usedLater = document.getElementById("divmotto").scrollHeight;
document.getElementById("divmotto").style.display = "none";
//then link to child page in iframe
child page
parent.document.getElementById("divmotto").style.display = "inline";
parent.document.getElementById("divmotto").style.visibility = "visible";
//motto shows text on left, width only sufficient for text, but font and colours okay.
//width:100%;text-align:center; properties seemingly ignored, all browsers.
How can I get width:100%; and text-align:center; correct ?
Thanks.
#divmotto{
font-size:100%;
font-style:italic;
font-weight:bold;
float:center;
width:100%;
text-align:center;
background-color:#E4521E;
padding:0%;
clear:both;
color:#DCED8F;
margin:0%;
border:0%;
}
<div id="divmotto">my motto</div>
//page shows motto in centre of row across page
var usedLater = document.getElementById("divmotto").scrollHeight;
document.getElementById("divmotto").style.display = "none";
//then link to child page in iframe
child page
parent.document.getElementById("divmotto").style.display = "inline";
parent.document.getElementById("divmotto").style.visibility = "visible";
//motto shows text on left, width only sufficient for text, but font and colours okay.
//width:100%;text-align:center; properties seemingly ignored, all browsers.
How can I get width:100%; and text-align:center; correct ?
Thanks.