css - Div float & negative margin question -


I hope this is a simple one, but I can not seem to be able to crack it quickly ...

I have a 2 column layout, as well as the dynamic dynamic and AJAX content in the right column. Therefore, page height varies depending on what is in the right column.

I should speak a small flash file (400px x 200px) at the bottom of the page, but below column 1.

The problem is that I want a negative top margin of Flash-200px, so it's not getting trapped on its own. This also reduces waste white space.

  & lt; Div id = "container" & gt; & Lt; Div id = "col_1" style = "float: left; padding-bottom: 200px;" & Gt; Some static content & lt; / Div & gt; & Lt; Div id = "col_2" style = "float: left" & gt; AJAX content & lt; / Div & gt; & Lt; Div style = "clear: left" & gt; & Lt; / Div & gt; & Lt; 
P>

I have simplified the code, but you should see what I am saying. Simple 2 columns, clear columns, put a negative margin on the flash div. IE6 works well in Safari , Fails miserably in Opera, Firefox and Chrome.

Can you explicitly apply "margin"?

All help Staying;)

here you go:

  & lt; ! DOCTYPE html public "- // W3C // DTD XHTML 1.0 Strongly // N" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">< html & gt ;  gt; & lt; body & gt; & lt; body & gt; & lt; div id = "container" style = "status: relative;" & gt; & lt; div id = " Col_1 "style =" float: left; Padding-bottom: 200px; Background color: # 235124; "& Gt; Certain Static Content & lt; br / & gt; Another Line & lt; / div & gt; & lt; div id =" col_2 "style =" float: left "& gt; AJAX content & lt; / Div> 

All this requires an additional div to wrap, but it is necessary to enable relative positioning.

Ignore additional tags, flash objects and background colors, they Only to clarify the problem were when I I was trying to understand what is happening.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -