简体   繁体   中英

Overlapping <div>'s with floats

I'm trying to make a page with two overlapping div's, one aligned to the left with the float:left attribute, and the other next to it, but overlapping by means of a negative margin.

Despite all this, I just get text as my output when I preview in browser from Dreamweaver. Problem is, it looks exactly how I want it in DW's preview pane.

Here is the jsFiddle , and how it looks in Dreamweaver.

Try swapping positions of the #img div, and the #titlebar div; AND make sure both are set to 'float:left'.

(#img div first, then #titlebar div in the HTML)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM