Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder
    Join Date
    Jun 2008
    Location
    New Jersey
    Posts
    2,536
    Thanks
    45
    Thanked 259 Times in 256 Posts

    Floating elements acting strange in Chrome

    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:
    Code:
    <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">
    	</div>
    </div>
    Attached Thumbnails Attached Thumbnails Floating elements acting strange in Chrome-mess.jpg   Floating elements acting strange in Chrome-right.jpg  

  • #2
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Do you have a link?
    Teed

  • #3
    Senior Coder
    Join Date
    Jun 2008
    Location
    New Jersey
    Posts
    2,536
    Thanks
    45
    Thanked 259 Times in 256 Posts
    Quote Originally Posted by teedoff View Post
    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.

  • #4
    Senior Coder
    Join Date
    Jun 2008
    Location
    New Jersey
    Posts
    2,536
    Thanks
    45
    Thanked 259 Times in 256 Posts
    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?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •