Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

CSS Clear Issue

Posted on 2011-02-17
3
Medium Priority
?
269 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 1000 total points
ID: 34919685
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 1000 total points
ID: 34920015
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
ID: 34920316
Thank you both!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Find out what you should include to make the best professional email signature for your organization.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

971 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