Border around main div
-
Hey guys,
I′m having a CSS and XHTML problem. I have a #main div that contains a #sidebar and #content div. I′m trying to make a border around this #main div. It only seems to work in IE (7), not in FF. Here’s the xhtml (partially):
<body> <div id="rap"> <div id="header"> <div id="logo"> </div> <div id="horimenu"> <ul> <?php wp_list_pages('sort_column=menu_order&title_li=&depth=1'); ?> </ul> </div> </div> <div id="main"> <div id="content"> <div class="post"> <div class="post-info"> <div class="post-title"> <h2>Het laptop dilemma</h2> </div> <div class="post-date"> <h2>17 juni 2007</h2> </div> </div> <div class="post-content"> <p>Some content here</p> </div> </div> </div> <div id="sidebar"> <div id="rss" class="sidebardiv"> <h2>RSS abbonementen</h2> <ul> <li><a href="#">RSS voor logs</a></li> <li><a href="#">RSS voor reacties</a></li> </ul> </div> <div id="lastlogs" class="sidebardiv"> <h2>Laatste logs</h2> <ul> <li><a href="#">Het laptop dilemma</a></li> <li><a href="#">Zelfgemaakte ijsthee</a></li> <li><a href="#">AGLOCO viewbar te downloaden</a></li> <li><a href="#">Traffic generen met een blogkermis</a></li> <li><a href="#">Even over de grote donorshow</a></li> </ul> </div> <div id="categories" class="sidebardiv"> <h2>Categorien</h2> <ul> <li><a href="#">Alledag</a></li> <li><a href="#">Communicatie</a></li> <li><a href="#">Cultuur</a></li> <li><a href="#">Energiebesparing</a></li> <li><a href="#">Informatiemanagement</a></li> <li><a href="#">Overheid</a></li> <li><a href="#">School</a></li> <li><a href="#">Walter's cuisine</a></li> <li><a href="#">Web</a></li> </ul> </div> </div> </div> </div> </body>
This is the CSS:
body { text-align:center; font-family:Arial, Helvetica, Sans-Serif; } #rap { width: 800px; margin:0 auto; } #header { } #logo { margin:0 auto; width:725px; height:180px; background: url(img/logo.png) #6C5635 no-repeat bottom center; } #horimenu { background-color:#2e3192; padding:10px 0px; } #horimenu ul { margin:0px; list-style-type: none; display: inline; } #horimenu ul li { padding: 0 5px; list-style-type: none; display: inline; } #horimenu a, #horimenu a:link, #horimenu a:visited, #horimenu a:hover { font-size:14pt; color:#fff; text-decoration:none; } #horimenu a:hover { color:#6C5635; text-decoration:underline; } #main { width:725px; margin:0 auto; border-left: 2px solid #2E3192; border-right: 2px solid #2E3192; border-bottom: 2px solid #2E3192; display:block; } #content { float:right; width:485px; margin-right:10px; display: inline; } #sidebar { float:left; width:210px; margin-left:10px; display: inline; } div.sidebardiv { float:left; width: 200px; margin:5px 0; text-align:left; background: #8CC63F; } div.sidebardiv ul li { padding:0 0 0 0; list-style: none; } div.sidebardiv ul li a{ color:#fff; } div.sidebardiv h2 { padding: 0 0 0 5px; font-size:14pt; color:#2E3192; } .page_item ul li a, .page_item ul li a:visited, .page_item ul li a:hover { display: inline; color:#fff; font-weight:bold; } .post { width:100%; } .post-title { float:left; text-align:left; } .post-date { float:right; text-align:right; } .post-content { float:left; text-align:left; }
Can anybody tell me what I’m doing wrong here? There’s a screenshot of the result here.
Viewing 15 replies - 1 through 15 (of 15 total)
Viewing 15 replies - 1 through 15 (of 15 total)
- The topic ‘Border around main div’ is closed to new replies.