/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] CSS: Page not aligning to center

I need a fresh set of eyes on this, to see where I am going wrong on it.

If someone can take a look to see why wrap3 dosen’t align to center that would be great.

HTML

[code=html]<html>
<head>
<title>Page Title</title>

<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>

<script src=”js/prototype.js” type=”text/javascript”></script>
<script src=”js/scriptaculous.js?load=effects” type=”text/javascript”></script>
<script src=”js/lightbox.js” type=”text/javascript”></script>

<link rel=”stylesheet” href=”css/lightbox.css” type=”text/css” media=”screen” />
<link rel=”stylesheet” type=”text/css” href=”css/main.css” media=”screen,projection” />

<style type=”text/css”>
html>body .outerpair1 {background: url(img/upperrightfade.png) right top no-repeat;}
html>body .outerpair2 {background: url(img/lowerleftfade.png) left bottom no-repeat; padding-top: 8px; padding-left: 8px;}
html>body .shadowbox {background: url(img/shadow.png) bottom right;}
html>body .innerbox {position: relative; left: -8px; top: -8px;}
.textbox {position: absolute; align: center;}
.style1 {font-size: medium}
</style>

</head>

<body bgcolor=”#FFFFFF” leftmargin=”0″ topmargin=”0″ marginwidth=”0″ marginheight=”0″>
<br><br>

<div class=”outerpair1 textbox” >
<div class=”outerpair2″>

<div class=”shadowbox”>
<div class=”innerbox”>

<div id=”wrap3″ valign=”top” align=”center”>

<div id=”head”>
<div id=”top”>
<table id=”Table_01″ width=”867″ height=”183″ border=”0″ cellpadding=”0″ cellspacing=”0″ align=”center”>
<tr>
<td colspan=”3″ width=”471″ height=”61″ valign=”top”><!—logo—><img src=””></td>
<td rowspan=”2″ width=”396″ height=”183″ valign=”top”><!—flash—><img src=””></td>
</tr>
<tr>
<td width=”131″ height=”122″ valign=”top”><img src=””></td>
<td width=”131″ height=”122″ valign=”top”><img src=””></td>
<td width=”209″ height=”122″ valign=”top”><img src=””></td>
</tr>
</table>
</div>
<div id=”navi”>Test | Test | Test</div>
</div>
<div id=”aboutleftside”>

<div id=”leftside” align=”left”>
<h2 class=”hide”>Menu:</h2>
<ul class=”avmenu”>
<li><a href=”#”>Main</a> </li>
<ul>
<li><a href=”#”>Sub</a></li>
<li><a href=”#”>Sub</a></li>
</ul>
<li><a href=”#”>Main</a> </li>
<li><a href=”#”>Main</a> </li>
</ul>
</div>
<div id=”content”>

<table width=”500″>
<tr>
<td></td>
<td></td>
</tr>
</table>
</div>
</div>
<div id=”footer”>
Test | Test | Test
</div>
</div>

</div>
</div>

</div>
</div>

</body>
</html>[/code]

css to folllow

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@skilled1authorMay 04.2009 — CSS = /css/main.css
[code=html]@charset "UTF-8";
/* CSS Document */

/* Main body */
body { font-weight: bold; background:#e3e4e4 url(../img/bkgd2.jpg); background-repeat: repeat-x; color:#404040; font:12px Verdana, Tahoma, Arial, sans-serif; margin:0 auto; padding:0; text-align:center}
#wrap3 {background: #ffffff; color: #404040; margin: 0; width:867px; align:center;}


/* Basic tags */
a {font-size: 12px; background-color:inherit; color: #49839a; text-decoration:none;}
a:hover {background-color:inherit; color:#000000; text-decoration:underline;}
a img {padding-bottom: 5px; border-style: none;}
p { margin:0 0 1.4em;}

/* Header */
#header {font-weight: bold; height:70px; margin: 0px 0 0; padding:0;}
#header img {color:#929395; background-color: #ffffff; margin:0 0 10px; float:left;}
#header h1 {background-color:inherit; color:#929395; float:left; font-size:19px; margin:0 0 10px;}
#header h1 a {background-color:inherit; color:#929395; text-decoration:none;}
#header p {font-size:10px; font-family:Verdana, Geneva, Arial, Helvetica, sans-serif; float:right; padding: 15px 4px 0 0; color: #5e5e5e; line-height:1.3em; margin:0; text-align:right; width:500px;}
#header p:hover {text-decoration: none; color: #000000;}
#frontphoto {border:0; margin:0 0 10px;}
#header a { font-size: 1em; }

/* Navigation */
#navi {clear:both; margin:0 auto; padding:15px 0; border-top:0px; width:867px; text-align:center; color:#000000; height: 14px; background-color: #ffffff;}
#navi p {margin:0; float: left; padding:0px 10px 0; font-size: 10px;}
#navi a {color:#ffffff; background-color:transparent;text-decoration:none;font-weight:bold;font-size: 9px;}
#navi a:hover {color:#000000;text-decoration:none;}
#navi ul {margin: 0;padding: 0 15px 0 0;list-style: none;}
#navi li {font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #49839a; float: right; line-height: 1.3em; font-size: 13px; font-weight: normal; margin:0; padding:0;}

/*Left and right sidebar */
#leftside {clear: left; float: left; width: 145px; height: auto; background-repeat: no-repeat; margin: 0px 0px 0px 7px; padding: 4px 0px 8px 16px; line-height: 1.2em; vertical-align: top;}
#rightside {float:right; line-height:1.4em; margin:0 0 5px; padding:0; width:140px;}
#leftside p {padding: 0px 0 0 9px;}
#leftside li, #rightside li {line-height:1.2em; list-style:none; margin:0 0 6px; padding:0;}
#leftside p a {text-decoration: none; padding: 0px 0 0 0; color: #949596; font-size: 0.9em;}
#leftside ul ul, #rightside ul ul {margin:6px 0 0 10px; padding:0;}
#leftside ul ul li, #rightside ul ul li {margin:0 0 4px;}
#leftside ul ul li a, #rightside ul ul li a {font-weight:400;}
#leftside h2,#leftside h3 {color: #49839a; background-color:inherit; font-size:1.2em; margin: 0px 0px 0px; padding: 0px;}

/* Main menu */
#leftside ul.avmenu {width: 140px; margin: 15px 0 18px; padding: 0; list-style: none; position: absolute;}
#leftside ul.avmenu li {width:140px; padding:0; line-height:1.4em; display:inline;}
#leftside ul.avmenu li a {background-color:#ffffff; color: #49839a; font-weight:bold; width:140px; float:left; margin-bottom:5px; padding:5px 1px 5px 5px; text-decoration:none; border-bottom-width: 1px; border-top-width: 1px; display: block; border-top-style: dashed; border-bottom-style: dashed; border-top-color: #CCCCCC; border-bottom-color: #CCCCCC;}
#leftside ul.avmenu li a:hover{background-color:#EAEAFF; color: #000000; text-decoration:none;}
#leftside ul.avmenu li a.current {background-image: url(img/menuArrow.png); text-decoration:none;}
#leftside ul.avmenu ul {margin:0 0 0 15px; padding:0 0 5px 0; font-size:0.9em; width:125px;}
#leftside ul.avmenu ul a {padding: 3px 1px 0 5px; font-weight: normal; width: 115px;}
#leftside ul.avmenu ul ul {width:113px;}
#leftside ul.avmenu ul ul a, #rightside ul.avmenu ul ul a {width:100px;}

/* Main content */
#content {margin: 0 2px 5px 184px; height: 199px;padding: 7px 10px 2px 17px; background: url(img/mainCenter.jpg); background-repeat: no-repeat;}
#contentwide {margin: 0 2px 5px 184px; height: 199px;padding: 7px 10px 2px 17px;}
#contentwide2 {margin: 0 150px 5px 0;padding: 0 10px 0 25px;line-height: 1.5em;}
#content h2,#contentwide h2,#contentwide2 h2 {font-size:1.6em; color:00809c; margin:0 0 10px;}
#content h3,#contentwide h3,#contentwide2 h3 {font-size:1.3em; color:00809c; margin:0 0 8px;}
#content img,#contentwide img,#contentwide2 img {background:#fff; border:0px solid #fff; color:#fff; display:inline; padding:0px;}
#content ul, #contentwide ul, #contentwide2 ul, #content ol, #contentwide ol, #contentwide2 ol {margin:0 0 16px 20px; padding:0;}
#content li,#contentwide li,#contentwide2 li {margin:0; padding:0 0 0 5px;}
#content ul ul,#contentwide ul ul,#contentwide2 ul ul,#content ol ol,#contentwide ol ol,#contentwide2 ol ol {margin:0 0 0 16px; padding:0;}

/* Footer */
#footer {clear:both; margin:0 auto; padding:15px 0; border-top:0px; width:867px; text-align:center; color:#000000; height: 14px; background-color: #ffffff;}
#footer p {margin:0; float: left; padding:0px 10px 0; font-size: 10px;}
#footer a {color:#ffffff; background-color:transparent;text-decoration:none;font-weight:bold;font-size: 9px;}
#footer a:hover {color:#000000;text-decoration:none;}
#footer ul {margin: 0;padding: 0 15px 0 0;list-style: none;}
#footer li {font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #49839a; float: right; line-height: 1.3em; font-size: 13px; font-weight: normal; margin:0; padding:0;}

/* Blog Subpage menu */
#subpages {border-bottom:1px solid #e0e0e0; border-left:1px solid #e0e0e0; float:right; font-weight:bold; line-height:1.3em; margin:-5px 0 8px 15px; padding:0 0 10px 10px; width:190px;}
#subpages h2 {font-size:1.2em; font-weight:bold; letter-spacing:-1px; line-height:1.3em; margin:0 0 12px;}
#subpages ul.submenu {line-height:1.4em; list-style:none; margin:0;}
#subpages ul.submenu li {display:inline; line-height:1.4em; width:180px; padding:0;}
#subpages ul.submenu li a {background-color:#f4f4f4; border-left:4px solid #cccccc; color:#505050; float:left; font-weight:bold; margin-bottom:5px; padding:3px 1px 3px 5px; text-decoration:none; width:180px;}
#subpages ul.submenu li ul {margin:0 0 5px 10px; width:170px;}
#subpages ul.submenu li ul li a {width:170px;}
#subpages ul.submenu li ul ul {margin:0 0 5px 10px; width:160px;}
#subpages ul.submenu li ul ul li a {width:160px;}
#subpages ul.submenu li ul ul ul {margin:0 0 5px 10px; width:150px;}
#subpages ul.submenu li ul ul ul li a {width:150px;}
#subpages ul.submenu li a:hover,#subpages ul.submenu li.current_page_item a {background-color:#eaeaea; border-left:4px solid #286ea0; color:#555;}
#subpages ul.submenu li.current_page_item ul li a {background-color:#f4f4f4; border-left:4px solid #cccccc; color:#555;}

/* Blog Tags */
p,ul,ol {margin:0 0 18px;}
blockquote {border-left:4px solid #e0e0e0; margin:20px; padding:8px 8px 8px 15px;}
blockquote p {background-color:inherit; color:#505050; font-size:0.9em; line-height:1.3em;}
label {background-color:inherit; color:#606060; font-size:0.9em; font-weight:bold;}
table#wp-calendar {margin:0 0 20px; width:140px;}
code {font-size:1.2em; display:block; padding:5px 5px 5px 8px; background-color:#f4f4f4; margin:5px 0 15px 0;border-left:4px solid #cccccc;}

/* Blog Float fix */
.contenttext {overflow:hidden;}
* html .contenttext {height:1px; overflow:visible;}
* html .contenttext p {overflow:hidden; width:99%;}

/* Blog Misc Classes */
.post {margin:0 0 25px;}
.postinfo {background-color:#f4f4f4; border-left:4px solid #cccccc; color:#606060; font-size:0.9em; font-weight:bold; line-height:1.5em; margin:1px 0 40px; padding:8px 5px 8px 8px;}
.comment {background-color:#f4f4f4; border-left:4px solid #cccccc; color:#606060; margin:0 0 10px; padding:8px 5px 0 8px;}
.comment p.commenthead {line-height:1.6em;}
.comment p {font-size:0.9em; line-height:1.3em; margin:0 0 6px; padding-bottom:5px;}
.navigation {display:block; margin:10px 0; padding:0 0 15px; text-align:center;}
.navigation p {margin:0; padding:0;}
.prevlink {margin-right:20px;}
.nextlink {margin-left:20px;}

/* Additional classes */
.left {float:left; margin:3px 10px 2px 0;}
.right {float:right; margin:2px 0 2px 10px;}
.textright {text-align:right;}
.center {text-align:center;}
.small {font-size:0.8em;}
.bold {font-weight:bold;}
.timestamp {font-size:1.2em; margin:-5px 0 15px 10px;}
.timestamp a {font-weight:400;}
.announce {background-color:#f4f4f4; clear:left; color:#505050; font-size:0.9em; line-height:1.5em; margin:10px 0 15px; padding:7px 5px 2px 5px; width:140px;}
.announce p {margin:10px 0 0; padding:0;}
.postinfo {background-color:#f4f4f4; border-left:4px solid #ccc; color:#606060; font-size:0.9em; line-height:1.4em; margin:1px 0 20px; padding:8px 5px 8px 8px;}
.clearing {clear:left; margin:0; padding:0; visibility:hidden;}
.hide {display:none;}
#eForm {margin: 0px 0px 0px 210px; padding: 15px 0px 0px 8px; background: url(img/tableBG.jpg); background-repeat: no-repeat;line-height: 1.1em;}
#eForm h1 {color: #50c0e0; font-size: 9px;}
#eform form, input, textarea, select, option {background-color: #ffffff; border-color: #000; color: black; border: 1px solid #777; font-family: arial, verdana, ms sans serif; font-weight: none; font-size: inherit;}
#eForm input { border: 1px solid #777; }
.noborder { border: none; }

.applynow {
font-weight: bold;
float: right;
color: #49839a;
}

#formchecking {
width: 550px;
margin: 0 0 5px 180px;
padding: 0 110px 0 155px;
line-height: 1.5em;
color: #ff0000;
}[/code]
Copy linkTweet thisAlerts:
@skilled1authorMay 05.2009 — anyone?
Copy linkTweet thisAlerts:
@skilled1authorMay 07.2009 — so after about 7 hours staring at this, i know its a problem with the 'wrap3' div forcing everything to align to the left, but i need it to contain the other divs on the page so that the realistic drop shadow on my site works properly.

anyone feature a guess as to why its not aligning to center, or has some time to take a look at it?
Copy linkTweet thisAlerts:
@skilled1authorMay 07.2009 — Mods feel free to close this topic, i JUST figured it out....
×

Success!

Help @skilled1 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...