November 5, 200818 yr I'm centering my site or at least trying to. I have includes: footer header content sidebar html in header: <body> <div class="wrapper"> and closing </div> I have added to footer </div><div id="footer"> my css is: body { background-color: #000000; text-align:center; } #wrapper { margin: 0 auto; width: 929px; text-align:left; } Is there a reason why the site isn't been centered?
November 5, 200818 yr You've given the div a class of wrapper but you're trying to style an element with an id of wrapper. Change your css to body { background-color: #000000; text-align:center; } .wrapper { margin: 0 auto; width: 929px; text-align:left; }
November 5, 200818 yr Author So i have the header & content centered but nothing else plus the content is heigher than it should be here I have removed absolute positioning on the sidebar (id=sidebar), news (id=apDiv7), menu (id=apDiv3) #sidebar { width:426px; height:492px; z-index:8; float:left; background-color: #D9CFDE; } #apDiv7 { width:471px; height:495px; z-index:7; overflow: auto; background-color: #D9CFDE; } #apDiv3 { width:929px; height:36px; z-index:8; background-color: #BDAEC6; border:solid #FFFFFF thin; } full style sheet uploaded style.css
November 5, 200818 yr Author Have you got a link to the site? site here the header & main content divs are in the correct positions but nothing else is
November 5, 200818 yr Author the attached is how it was in the beginning, the left handside is where the sidebar should go template.html
November 6, 200818 yr are my sidebar and main content outside my main area (apDiv4 ) as they are sitting underneath but appear to be in the wrapper. I have attached all page EDIT: I have the main content inside the apDiv4 div but how do I place the sidebar div there as it's an include <div id="apDiv4"> <div id="apDiv7"> <div align="center" class="style1"> <?php include 'news/news.php'; ?> </div> </div> </div> why is apDiv7 positioned behind apDiv4 and higher than it should be? index.php footer.php header.php sidebar.php style.css menu.css
November 6, 200818 yr I'm getting there with IE apart from menu my style sheet is: @charset "utf-8"; /* CSS Document */ body { background-color: #000000; text-align:center; } #contentmain { margin: 0 auto; width: 929px; height: 1000px; text-align:left; background-color: #DED6E2; border:solid #FFFFFF thin; } #apDiv7 { width:471px; height:495px; overflow: auto; float:right; background-color: #D9CFDE; } #apDiv8 { position:absolute; left:25px; top:545px; width:906px; height:144px; } #apDiv9 { position:absolute; left:76px; top:618px; width:780px; height:4px; background-color: #000000; } #apDiv10 { position:absolute; left:248px; top:539px; width:180px; height:232px; background-color: #DED6E2; } #header { width:929px; height:140px; border-left: solid #FFFFFF thin; border-right: solid #FFFFFF thin; border-top:solid #FFFFFF thin; margin: 0 auto; } #apDiv12 { position:absolute; left:41px; top:539px; width:180px; height:232px; background-color: #DED6E2; } #apDiv13 { position:absolute; left:74px; top:288px; width:322px; height:118px; } #apDiv14 { position:absolute; left:28px; top:428px; width:423px; height:90px; background-color: #CBB3FF; } #apDiv2 { width:100%; height:18px; background-color: #EFEFEF; } #apDiv3 { width:929px; height:36px; margin: 0 auto; background-color: #BDAEC6; border:solid #FFFFFF thin; } body { background-color: #000000; } } #footer { width:100%; height: 10px; top:1000px; background-color: #EFEFEF; } .content (line 60) { border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #d4c7c1; padding-right: 5px; padding-left: 5px; font-size: 10px; padding-bottom: 5px; color: #ce673a; line-height: 13px; padding-top: 5px; font-family: Arial; background-color: #d8cdc7; text-align: justify; } #apDiv6E { float:left; width:412px; height:492px; background-color: #D9CFDE; } .title3{ background-color: #997c81; background-image: url(); line-height:0.5; background-repeat: repeat;border-top-width: 0px; font-family: arial; font-size: 10px; text-transform: uppercase; text-align: center; color: #343a44; } .title { background-image: url(); background-repeat: repeat; background-color: #746063; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #d3d3d3; border-right-color: #d3d3d3; border-bottom-color: #d3d3d3; border-left-color: #d3d3d3; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; font-family: arial; font-size: 10px; text-transform: uppercase; text-align: center; color: #c0c0c0; } .content { padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; background-color: #fcfcfc; font-family: Tahoma; font-size: 9px; color: #acacac; line-height: 11px; letter-spacing: 0px; text-align:left; } .content1 img{ float: left; margin: 5px 5px 5px 5px; border: 1px solid #666; background-color: #fcfcfc; font-family: Tahoma; font-size: 9px; color: #acacac; line-height: 11px; letter-spacing: 0px; } .float { font-family: Tahoma; font-size: 9px; color: #acacac; line-height: 11px; letter-spacing: 0px; border-style: solid; border-width:1px; border-color: #dadada; padding:6px; margin: 2px; background-color:#ffffff; } .comments { padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; background-color: #fcfcfc; font-family: Tahoma; font-size: 9px; color: #acacac; line-height: 11px; letter-spacing: 0px; text-align:right; } .image { border-style: solid; border-width:1px; border-color: #dadada; padding:6px; margin: 2px; background-color:#ffffff; } .imageborder { margin-top: 30px; margin-bottom: 30px; background-color:#ffffff; } a img { border-style: solid; border-width:1px; border-color: #dadada; padding:6px; margin: 2px; background-color:#ffffff; } .img { border-style: solid; border-width:1px; border-color: #dadada; padding:6px; margin: 2px; background-color:#ffffff; } .content image { border-style: solid; border-width:1px; border-color: #dadada; padding:6px; margin: 2px; background-color:#ffffff; } .content imageborder { margin-top: 30px; margin-bottom: 30px; background-color:#ffffff; } .content img { border-style: solid; border-width:1px; border-color: #dadada; padding:6px; margin: 2px; background-color:#ffffff; } a:link { text-decoration: none; color: #8ca8bc; font-weight: normal; } a:hover { #sidebar { width:426px; height:492px; float:right; background-color: #D9CFDE; } text-decoration: underline; color: #6772a7; font-weight: normal; } .wrapper { margin: 0 auto; width: 950px; text-align:left; } .clear { clear: both; } why is it looking wrong in FF? do I need to add 'top' to the contentmain css?
November 6, 200818 yr Why do you have to do includes? Why not just attach external stylesheets to one index.htm file? Just curious.
November 7, 200818 yr I use includes so I don't have to edit every page each time I change amything that is on all pages
Create an account or sign in to comment