![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
How can I get Opera and Firefox to show a border with a <div> for the page below? http://mark4asp.freehostingnow.com/DealFlow.html The content of the <div> with a class="DealFlowContainer" is shown outside, below the div. Why is that and what can I do to ensure that all the content inside the div is surrounded by the border of the containing div? PS: You can see the effect I want by viewing it in IE. IE is doing it wrong. The only content inside the DealFlowContainer div |
#3
| |||
| |||
|
|
mark4asp wrote: How can I get Opera and Firefox to show a border with a <div> for the page below? http://mark4asp.freehostingnow.com/DealFlow.html The content of the <div> with a class="DealFlowContainer" is shown outside, below the div. Why is that and what can I do to ensure that all the content inside the div is surrounded by the border of the containing div? PS: You can see the effect I want by viewing it in IE. IE is doing it wrong. The only content inside the DealFlowContainer div below the DealFlowBlurb div are the DealFlowBanner and DealFlowImageContainer divs, and they both float. Content inside a div that contains floats wraps around the floats, but the floats themselves are outside the flow of the containing div and don't contribute to its dimensions. In this case, since I believe the DealFlowBlurb will always be higher than the image, make the image container float right, and position the blurb after it and don't have it float at all. |
#4
| |||
| |||
|
|
How can I get Opera and Firefox to show a border with a <div> for the page below? http://mark4asp.freehostingnow.com/DealFlow.html The content of the <div> with a class="DealFlowContainer" is shown outside, below the div. Why is that and what can I do to ensure that all the content inside the div is surrounded by the border of the containing div? PS: You can see the effect I want by viewing it in IE. |
|
What should I be doing here? Here are the relevant class definitions for the html: .DealFlowContainer { border: 2px solid #7e93c6; margin: 6px 0px 0px 0px; width:990px; /* add this next line */ |
|
} |
#5
| |||
| |||
|
|
mark4asp wrote: How can I get Opera and Firefox to show a border with a <div> for the page below? http://mark4asp.freehostingnow.com/DealFlow.html The content of the <div> with a class="DealFlowContainer" is shown outside, below the div. Why is that and what can I do to ensure that all the content inside the div is surrounded by the border of the containing div? PS: You can see the effect I want by viewing it in IE. IE is doing it wrong. The only content inside the DealFlowContainer div below the DealFlowBlurb div are the DealFlowBanner and DealFlowImageContainer divs, and they both float. Content inside a div that contains floats wraps around the floats, but the floats themselves are outside the flow of the containing div and don't contribute to its dimensions. In this case, since I believe the DealFlowBlurb will always be higher than the image, make the image container float right, and position the blurb after it and don't have it float at all. |
#6
| |||
| |||
|
|
mark4asp wrote: How can I get Opera and Firefox to show a border with a <div> for the page below? http://mark4asp.freehostingnow.com/DealFlow.html The content of the <div> with a class="DealFlowContainer" is shown outside, below the div. Why is that and what can I do to ensure that all the content inside the div is surrounded by the border of the containing div? PS: You can see the effect I want by viewing it in IE. Because IE got it wrong! Floats are not supposed to be "contained" by parent elements in normal flow. The easiest way to get what you wish is to change the overflow property on the container What should I be doing here? Here are the relevant class definitions for the html: .DealFlowContainer { border: 2px solid #7e93c6; margin: 6px 0px 0px 0px; width:990px; /* add this next line */ overflow: hidden; } -- Take care, Jonathan ------------------- LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com |
![]() |
| Thread Tools | |
| Display Modes | |
| |