Positioning Javascript Tag on HTML Page
Posted
by
user3385997
on Stack Overflow
See other posts from Stack Overflow
or by user3385997
Published on 2014-08-24T22:11:13Z
Indexed on
2014/08/24
22:20 UTC
Read the original article
Hit count: 212
I'm growing frustrated in positioning my javascript date in the center of my html page. Everything else is centered but the javascript date.
Here's a screenshot:
My HTML:
<section>
<a href="http://validator.w3.org/check?uri=http%3A%2F%2Fhills.ccsf.edu%2F~avu%2Fhw1.html" target="_blank"><img id="html5logo"src="images/html5_logo.png" alt="html5" height="50" width="50" /></a>
<a href="http://alturl.com/9kv4o" target="_blank"><img id="csslogo" src="images/css_logo.gif" alt="css" height="50" width="50" /></a>
</section>
<br />
<p id="pagelastupdated">Page last updated:</p>
<script type="text/javascript">
document.write(document.lastModified);
</script>
And here's my CSS:
section {
margin-top: 10px;
margin-left: auto;
margin-right: auto;
width: 112px;
}
section img#html5logo {
display: inline;
margin-left: auto;
margin-right: auto;
}
section img#csslogo {
display: inline;
margin-left: auto;
margin-right: auto;
}
#pagelastupdated {
text-align: center;
}
script {
border: 4px solid purple;
}
PLEASE HELP ME!
© Stack Overflow or respective owner