Solved

CSS Clear Issue

Posted on 2011-02-17
3
220 Views
Last Modified: 2012-05-11
On the page below we have included clear:both in the CSS for the appropriate footer divs, yet the footer still doesn't clear the right column.

It looks like the divs are closed correctly.

Any help would be greatly appreciated: http://new.pecklaw.com/practiceareas/contract_review_program
0
Comment
Question by:jsuissa
3 Comments
 
LVL 3

Accepted Solution

by:
thecrew earned 250 total points
Comment Utility
Okay, I think this should work for you. I think that your #apDiv2 div should be moved after your div with a class of "Construction", and the position declaration of apDiv2 should be relative not absolute (div.css line 485). you'll want to add a float:left to this div, also the left declaration for apDiv2 should be something like -23px. You will need to play a bit with the top declaration to get it back where you want it vertically (I'd try -155px or so). All of those will be on line 485.
So it should now look like this:

#apDiv2 {
background-color:#FFFFFF;
border-left:1px solid #4090AC;
float:left;
height:550px;
left:-23px;
position:relative;
top:-155px;
width:308px;
z-index:1;
}

I think that will work for you.
0
 
LVL 10

Assisted Solution

by:jtwcs
jtwcs earned 250 total points
Comment Utility
The clear will not work because you have the apDiv2 positioned absolutely.  If you swap order of the Construction div with the apDiv2, you can float the apDiv2 to make the clear work.  Here is what I changed for the ConstructionMiddleContent div.

 
<div class="ConstructionMiddleContent">

<div class="Construction"><div class="Left"><h2>With a unique team of attorneys wholly dedicated to drafting and reviewing contracts, Peckar &amp; Abramson offers an unparalleled level of expertise and up-to-the-minute knowledge of contract practices and terms.</h2>
<p>We specialize in identifying the risks posed by potential contracts and eliminating or devising responses to those risks. Our attorneys also can prepare contracts and guide clients through the industry’s maze of standard and non-standard contract issues.
</p>
    
</div>
</div> 


<div id="apDiv2">
          <div class="LawUpperSection"><ul><li><h4>Richard L. Abramson</h4>
<p>+1 201.343.3434
rabramson@pecklaw.com</p></li>
          </ul></div>
          <!--LawBottomSection Section Starts here-->
          <div class="LawBottomSection"><h2>Practice Areas</h2><ul>
    
<li><a href="http://new.pecklaw.com/practiceareas/international_construction">International Construction</a></li>
    
<li><a href="http://new.pecklaw.com/practiceareas/securities_litigation_regulatory_compliance">Securities Litigation Regulatory &amp; Compliance</a></li>
    
<li><a href="http://new.pecklaw.com/practiceareas/white_collar_criminal_defense_compliance">White Collar Criminal Defense Compliance</a></li>
    
<li><a href="http://new.pecklaw.com/practiceareas/real_estate">Real Estate</a></li>
    
<li><a href="http://new.pecklaw.com/practiceareas/contract_compliance_and_ethics">Contract Compliance and Ethics</a></li>
    
<li><a href="http://new.pecklaw.com/practiceareas/employment">Employment</a></li>
    
<li><a href="http://new.pecklaw.com/practiceareas/corporate">Corporate</a></li>
    
<li><a href="http://new.pecklaw.com/practiceareas/labor_and_immigration">Labor and Immigration</a></li>
    
<li><a href="http://new.pecklaw.com/practiceareas/dispute_resolution">Dispute Resolution</a></li>
    
<li><a href="http://new.pecklaw.com/practiceareas/public_private_partnerships">Public-Private Partnerships</a></li>
    
<li><a href="http://new.pecklaw.com/practiceareas/contract_review_program">Contract Review Program</a></li>
    
<li><a href="http://new.pecklaw.com/practiceareas/project_notice">Project Notice</a></li>
    
<li><a href="http://new.pecklaw.com/practiceareas/government_contract_law">Government Contract Law</a></li>
    
<li><a href="http://new.pecklaw.com/practiceareas/construction_law">Construction Law</a></li>
    
<li><a href="http://new.pecklaw.com/practiceareas/environmental_law">Environmental Law</a></li>
    
          </ul>
          </div>
        
          </div>       
</div>

Open in new window


CSS changes to replicate what you originally had.

.Left {
    float: left;
    padding: 0 25px 41px 10px;
    width: 582px;
}

#apDiv2 {
    background-color: #FFFFFF;
    border-left: 1px solid #4090AC;
    float: left;
    margin: -155px 0 0;
    width: 308px;
}

Hope this helps.

0
 

Author Comment

by:jsuissa
Comment Utility
Thank you both!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now