views:

897

answers:

2

Heyy guys, two problems, both caused by IE7

www.myvintagesecret.com

1)I have a Div called .postheader that holds the title and another div called .clip . As you can see, the clip should hover over the content and not push it down. (use any other browser to test). Its currently giving me a huge gap when it should only go as long as the text does.

.postheader {
    background:url(images/posthead.png) no-repeat;
    min-height:100px;
    max-height:600px;
    padding-right:25px;
    overflow:visible;
}

.clip {
    width:214px;
    height:275px;
    float:right;
    position:relative;

}

Any ideas? I can make the max height smaller, but that causes the .clip div to be cut off.

2) In the sidebar, there are a bunch of items called .sidebaritem. They have a background image that is only not showing up in IE7. I can't figure this one out.

.sidebar-item
{
    background:url(images/sidebar.png)top center no-repeat;
    font-size: 12px;
    margin-bottom: 20px;
    padding-left: 18px;
    padding-right:10px;
    padding-top:8px;
    min-height:200px;

}
A: 

1) Try this. I think using position:absolute instead of float:right will solve the problem.

.postheader {
    background:url(images/posthead.png) no-repeat;
    position:relative;
}

.clip {
    width:214px;
    height:275px;
    position:absolute;
    top:0;
    right:25px;
}

2) Hmm.. It could be the space after closing ).

background:url(images/sidebar.png) top center no-repeat;

3) Response to comment: In that case... You should redo the background. Create wrappers with backgrounds only and put your content inside. Clip should be the top div inside wrapper and float to right. Do something like...

<div class="itemTopBg"><div class="itemBottomBg"><div class="itemLeftBg"><div class="itemRightBg">
  <div class="clip">...</div>
  ... content with no bg... just text...
</div></div></div></div>
Brian Kim
Thanks, that works but it overlaps my text. Since the div doesn't show up every post, I can't make the text a certain width. Any idea?
Oh, and the Space on 2) worked! Thanks
Thanks a ton Brian. I used your first suggestion with a quick hack. Will code your suggestion once I get a break :)
+1  A: 

I think I solved 1) with these changes

.clip drop float right, change position to absolute, and give it a right of 0.

.postheader add position relative

.postheader h2 width of around 400px

Seemed to work in IE7 and firefox, not sure how it looked in other browsers though.

Bela
Clip isn't there for every item. Setting width on h2 isn't a good idea. No reason to set narrower width for items without clip. If h2 is short clip covers text below. I suggest redoing the divs with background as explained in my answer.
Brian Kim