View Full Version : Floating elements acting strange in Chrome

01-27-2012, 04:30 PM
I have a div that is absolutely positioned to the top right of its parent element, and within that div, I have 2 images and a div that makeup its contents. To make it work (as I wasn't sure how to absolutely position the elements within a div that was already absolutely positioned) I floated the elements to the right. I'm not sure now why they're floated right instead of left, but hey, it works.

In Firefox and IE, the menu appears just how its supposed to (see attached image). However on Chrome, when I first visit the site, it appears broken (as shown attached), but then when I click a link to another part of the site, it corrects itself, however, if I refresh a page, it refreshes broken.

The code itself has nothing complex, essentially:

<div style="position: relative">
<div style="position: absolute; top: 0; right: 0;">
<img src="right.jpg" style="float: right">
<div style="float: right">Content</div>
<img src="left.jpg" style="float: right">

01-27-2012, 04:39 PM
Do you have a link?

01-27-2012, 04:50 PM
Do you have a link?

Unfortunately no... I have stuff locally, but I can put up a link when I get home from work tonight. I know it makes diagnosing a lot harder, just figured I'd put up a post, see if anyone had any initial thoughts.

Interestingly, I did check up on my server (older code) and found that it used to be fine... apparently something I changed broke it. I'll get the code up this evening and hopefully someone can help me figure out where it going wrong.

02-07-2012, 03:15 AM
I completely forgot about this thread.

I hope admins don't mind me bringing this back up.

http://test.gamersplane.com/ is the url for the site. Strangely though, I just uploaded all the latest code on my PC, and though on localhost the images appear as linked above, on the server it seems ok?