-
aligning two divs
I can get the divs next to each other but the over lap. <style type="text/css"> <!-- #apDiv1 { width:150px; height:318px; float:left; } #apDiv4 { width:201px; height:262px; float:left; } --> </style> <div id="sidebar"> <div> <table width="100%"> <tr class="title"> <td>Welcome</td> </tr> <tr class="content"> <td> </td> </tr> </table> </div> <div id="apDiv1"> <table width="180" border="1"> <tr class="title"> <td>netword</td> </tr> <tr class="content"> <td><img src="images/thumb_2.jpg" width="100" height="40" /><br /> <img src="images/thumb_31.jpg" width="100" height="40" /><br /> <img src="images/thumb_51011171.jpg" width="100" height="40" /><br /> <img src="images/thumb_Orfeh_281x211.jpg" width="100" height="40" /><br /></td> </tr> <tr class="title"> <td>affiliates</td> </tr> <tr class="content"> <td> </td> </tr> <tr class="title"> <td>site info</td> </tr> <tr class="content"> <td> </td> </tr> </table> </div> <div id="apDiv4"> <table width="100" border="1"> <tr class="title"> <td>latest images</td> </tr> <tr class="float"> <td><?php include "./gallery/cpmfetch/cpmfetch.php"; $objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php"); $objCpm->cpm_viewLastAddedMedia(2,2); $objCpm->cpm_close(); ?></td> </tr> <tr class="title"> <td>projects</td> </tr> <tr class="content"> <td><img src="images/51PgctCjNNL._SL500_AA240_.jpg" width="75" height="75" hspace="2" align="left"/>What Do You Want From Me<br /> Release: 30/09/08<br /> [info]</td> </tr> </table> </div> </div> </div> my css is: @charset "utf-8"; /* CSS Document */ * { margin:0; padding:0; } body { background-color: #000000; text-align:center; } .wrapper { margin: 0 auto; width: 950px; text-align:left; } .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; } .title3{ background-color: #997c81; background-image: url(); background-repeat: repeat; padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; font-family: arial; font-size: 10px; text-transform: uppercase; text-align: center; color: #343a44; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; } .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: #F5EFFB; font-family: Tahoma; font-size: 9px; color: #acacac; line-height: 11px; letter-spacing: 0px; text-align:left; width: 100%; } .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:#F5EFFB; } .comments { padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; background-color: #F5EFFB; 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; } #footer { width:100%; height: 15px; background-color: #746063; } #apDiv2 { width:100%; height:18px; background-color: #746063; } #apDiv3 { width:929px; height:36px; margin: 0 auto; background-color: #BDAEC6; border:solid #FFFFFF thin; } .menu { background-color: #BDAEC6; padding: 6px; font-family:Trebuchet MS; font-size:11px; text-transform:uppercase; color: black; } td.menu { background-color: #BDAEC6; padding: 8px; color:silver; cursor:default; font-family:Trebuchet MS; font-size:11px; text-transform:uppercase; line-height:13px; margin-bottom:0px; margin-top:0px; text-align:center; text-decoration:none; text-transform:none; vertical-align: top; } td.menu:hover { background-color: #997c81; padding: 8px; color: white; cursor:default; font-family:Trebuchet MS; font-size:11px; text-transform:uppercase; line-height:13px; margin-bottom:0px; margin-top:0px; text-align:center; text-decoration:none; text-transform:none; vertical-align: top; } .menu a:link{ color:black; text-transform:uppercase; text-decoration:none; font-weight:none;} .menu a:visited{ color:black; text-transform:uppercase; text-decoration:none; font-weight:none;} .menu a:active{ color:white; text-transform:uppercase; text-decoration:none; font-weight:none;} .menu a:hover{ color:whitw; text-transform:uppercase; text-decoration:underline; font-weight:none;} #contentmain { margin: 0 auto; width: 929px; height: 850px; text-align:left; background-color: #ECE0F8; border-left:solid #FFFFFF thin; border-right:solid #FFFFFF thin; border-top:solid #FFFFFF #ECE0F8; } #apDiv7 { width:500px; height:495px; top:140px; float:right; background-color: #E3CEF6; } #sidebar { width:426px; height:492px; float:left; background-color: #E3CEF6; } #header { width:929px; height:210px; border-left: solid #FFFFFF thin; border-right: solid #FFFFFF thin; border-top:solid #FFFFFF thin; margin: 0 auto; } The width of the 2 div's is less than the containing div 'sidebar'. float:left; means it overlaps the left div, float:right; mean it comes out of the sdebar div & overlaps the main content. EDIT - sorted the table & div weren't the same sizes
-
images in images folder but not showing up
I have my images in the 'images' folder and my code is: <td><img src="images/thumb_2.jpg" width="100" height="40" /></td> <td><img src="images/thumb_31.jpg" width="100" height="40" /></td> <td><img src="images/thumb_51011171.jpg" width="100" height="40" /></td> </tr> but the images aren't showing up here I'm not sure what is wrong
-
wrapper with includes
the attached is how it was in the beginning, the left handside is where the sidebar should go template.html
-
wrapper with includes
site here the header & main content divs are in the correct positions but nothing else is
-
wrapper with includes
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
-
divs not moving down
so i tried to go that with a site and it all goes wrong - here
-
wrapper with includes
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?
-
using margins to push text a way from image..
I have the following html: css is: @charset "utf-8"; /* CSS Document */ body { background-color: #000000; } #apDiv4 { position:absolute; left:10px; top:280px; width:929px; height:515px; z-index:4; background-color: #DED6E2; border:solid #FFFFFF thin; } #apDiv7 { position:absolute; left:461px; top:291px; width:471px; height:495px; z-index:7; overflow: auto; background-color: #D9CFDE; } #apDiv8 { position:absolute; left:25px; top:545px; width:906px; height:144px; z-index:8; } #apDiv9 { position:absolute; left:76px; top:618px; width:780px; height:4px; z-index:9; background-color: #000000; } #apDiv10 { position:absolute; left:248px; top:539px; width:180px; height:232px; z-index:11; background-color: #DED6E2; } #apDiv11 { position:absolute; left:123px; top:539px; width:132px; height:140px; z-index:10; } #apDiv12 { position:absolute; left:41px; top:539px; width:180px; height:232px; z-index:12; background-color: #DED6E2; } #apDiv13 { position:absolute; left:74px; top:288px; width:322px; height:118px; z-index:6; } #apDiv14 { position:absolute; left:28px; top:428px; width:423px; height:90px; z-index:13; background-color: #CBB3FF; } #apDiv1 { position:absolute; left:10px; top:17px; width:929px; height:210px; z-index:1; border-left: solid #FFFFFF thin; border-right: solid #FFFFFF thin; border-top:solid #FFFFFF thin; } #apDiv2 { position:absolute; left:4px; top:229px; width:943px; height:18px; z-index:2; background-color: #EFEFEF; } #apDiv3 { position:absolute; left:10px; top:247px; width:929px; height:36px; z-index:8; background-color: #BDAEC6; border:solid #FFFFFF thin; } body { background-color: #000000; } } #apDiv5 { position:absolute; left:4px; top:800px; width:943px; height:18px; z-index:9; 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 { position:absolute; left:23px; top:291px; width:426px; height:492px; z-index:8; background-color: #D9CFDE; } .title3{ background-color: #efefef; background-image: none; background-repeat: repeat; background-attachment: scroll; background-x-position: 0%; background-y-position: 0%; font-family: tahoma; font-style: normal; font-variant: normal; font-size: 10px; line-height: normal; font-size-adjust: none; font-stretch: normal; font-weight: normal; text-align: center; text-transform: none; letter-spacing: 1px; padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; color: #343a44; } .title { background-image: url(); background-repeat: repeat; background-color: #503051; 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: #ffffff; } .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; } .float{ float: left; margin: 10px 10px 10px 10px; border: 1px solid #666; background-color: #fcfcfc; font-family: Tahoma; font-size: 9px; color: #acacac; line-height: 11px; letter-spacing: 0px; width:51%; height:99; } .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; } as you can see I have image classes. These work for images pulled from coppermine but not for the images you see in 'latest project'. site Sidebar html: <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="title">LATEST IMAGES</td> </tr> <tr><td class="content"><p align="center"><?php include "./gallery/cpmfetch/cpmfetch.php"; $objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php"); $objCpm->cpm_viewLastAddedMedia(1,3); $objCpm->cpm_close(); ?></td></tr> </table> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="title">LATEST projects</td> </tr> <tr><td class="content"><table width="100%"> <tr> <td class="float"><img src="images/51PgctCjNNL._SL500_AA240_.jpg" width="75" height="75" hspace="2" align="left"/>What Do You Want From Me<br /> Release: 30/09/08<br /> [info]</td> <td class="float">test</td> </tr> </table> </td></tr> </table> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="title">NETWORK</td> </tr> <tr><td class="content"><p align="center"></td></tr> </table> </table>
-
2 sites unsure why something happens on one ...
I am using wordpress so I'm not sure if this is the right place to ask. On georgieparker.diva-host.com my images have no border but a margin to push the text away from the image. On libbytanner.diva-host.com my images have a border plus are pushed away from the image. this only happens with images coming from coppermine, all other images on libbytanner.diva-host.com aren't affected by me changing the code. in my LT style sheet i have: a images { border: 0px none; padding: 2px; text-align: left; } (this is the only place I've found on the sheet for images) both style sheets are attached stylelt.css stylegp.css
-
css font colour
sidebar & content have the same background - www.leannej.diva-host.com EDIT: I just changed the font to black and the sidebar hasn't changed EDIT AGAIN: having the font as size 8 didn't help changed it to 9 and it is much better
-
css font colour
maybe it just the size of the font thats making it look different lt.css
-
css font colour
I am trying to get my sidebar font to be the same as the content font. Sidebar is an include. I was able to change the side of the font by adding font-size: 8Px; to #sidebar but adding font-color or color doesn't change anything. I have: body, td, th { font-family: tahoma; font-size: 10px; text-align:justify; color: #808080; } at the top of my style sheet these effect the content div but not the include div
-
positioning of divs
thanks I have it centered now I have tried adding padding/margin to the sidebar & content so that that there is space between the edge of the div and th content but it doesn't seem to work
-
aligning text with images help
thank you
-
positioning of divs
I have a wrapper that contains all the layout and a wrapper 2 & container that contain the sidebar & content. The container div woould act the same as the wrapper2 div wouldn't it so I wouldn't need both? My style for both are: #container { width:881px; height:1100px; left: 11px; top: 21px; background-color: #EED2EE; } #wrapper2 { width: 881px; margin: 0 auto; } Should I add the margin: 0 auto; to the container style and remove wrapper2? I have left: ..px; top: ..px; In both sidebar & content are these still relevant? Where does the margin get added? inside the <div></div> or outside and to which div the container or the sidebar? - the sidebar is an include therefore is inside the container div and doesn't have it's only like the content does - <div id="content">