I'm having trouble pinpointing the error within my .css
file. Currently, my JavaScript content is displaying on the far left of the page instead of centered as I desire. Specifically, I want the address and contact information to be centered below the photo. As I am currently enrolled in a JavaScript course, I am limited to using only JavaScript for this task.
Where do you think the error lies - in the .css
or .js
file?
HTML:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link href="css/armchair.css" rel="stylesheet">
</head>
<body>
<!-- wrapper section starts -->
<div id="wrapper">
<!-- header section starts -->
<div id="header">
<img src="images/header.jpg" alt="Armchair Logo" width="975" height="230" class="floatcenter">
</div>
<!-- header section ends -->
<!-- menu section starts -->
<div id="menu">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="newrelease.html">New Releases</a></li>
<li><a href="placeholder.html" >Special Selection</a></li>
<li><a href="contact.html" id="current" class="first">Contact</a></li>
<li><a href="placeholder.html">On Sale</a></li>
</ul>
</div>
<!-- menu section ends -->
<!-- text section starts -->
<div id="content"></div>
<img src="images/viewcart.jpg" alt="" width="130" height="59" class="floatright" />
<br><br>
<img src="images/store.jpg" alt="Armchair Store" width="520" height="347" class="floatcenterb">
<br><br>
<div id="contact_details"></div>
<script type="text/javascript" src="js/contact.js"></script>
<br/>
</div>
<!-- footer section starts -->
<div id="footer">
<p class="bottom">Copyright © 2012 JC Design | All Rights Reserved | <a href="#">Terms and Conditions</a></p>
</div>
<!-- foot section ends -->
<!-- wrapper section starts -->
</body>
</html>
My .css
file:
/*--------------Body-----------------*/
html {background-color: #e2e2e2}
body {
color: #000; background: #fff;
font-family: "Helvetica Neue",helvetica,arial, sans-serif;
font-size: 90%;
text-align: left;
width: 975px;
margin-left: auto;
margin-right: auto;
}
p {
margin-left: 25px;
margin-right: 5px;
text-align: left;
font-size: 110%;
}
// Add your unique changes here
...
My .js
file:
//contact.js - custom script written by [Your Name]//
var Addre = new Array("7945", "Town Plaza", "Vancouver", "E5T 4J9","Canada");
var phoneNo = new Array("1-604-568-4938", "Toll free: 1-888-987-4738");
var eMail = new Array("<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="9df4f3fbf2ddfceff0fef5fcf4effff2f2f6b3fef2f0">[email protected]</a>");
// custom JavaScript modifications by [Your Name]
...