Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1589
  • Last Modified:

CSS Container Div

I have a container div that has two children;
Sidebar- floats left (nav buttons)
Main - float right ( main content; extends below sidebar)

I would like to place an image in the lower right corner of the container div.  The bottom of the image would align with the bottom of the main div
My current code:
      #navPic {
      clear: both;
      margin: 0px 0px 0px 0px;
      }
This code puts the top of the image equal to the bottom of the text in the main div.  The result is that I have a lot of empty space below the main div.  Any suggestions?

0
svp28
Asked:
svp28
  • 3
  • 3
1 Solution
 
cottsakCommented:
put this in the css for ur main div

background: #fff url(/path/to/image.jpg) no-repeat bottom right;
0
 
svp28Author Commented:
The image has to be in the container div.  The image is already at the bottom left.  The problem is I need the bottom of the image to be even with the bottom of the content div.
0
 
cottsakCommented:
is ur problem in both IE and FF?
0
[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

 
svp28Author Commented:
Yes.

http://www.lesstallguitars.com/intro.htm

I need the image at the bottom of the green box.
0
 
svp28Author Commented:
I got it by adding another container div

      background: url(images/leftnavguitar.JPG) no-repeat bottom left;
      overflow: hidden;
      width: 100%
      height: 100%;
      margin: 0px 0px 0px 0px;
0
 
cottsakCommented:
if ur interested i was going to suggest a div under both the sidebar and main divs but inside the container which has the css:
clear:both;
this usually aligns the contained divs to the bottom of the container
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now