- This topic is empty.
-
AuthorPosts
-
August 30, 2013 at 7:21 pm #148624
Paul808
ParticipantHi, I’m making my first full responsive site and I have run into an issue. The site seems to be working as intended in firefox and explorer (surprise). The browsers that are giving me issues are chrome and safari.
On the bio/landing page toward the bottom of the page are two sections one titled “I Got Skills”, the other titled “and they love me for them”. When I load the page (no matter what size the browser width is) it loads correctly however after the browser width is shrunk and then reopened the layout repositions. In the “skills” section the div on the right side is falling below the div on the left. In the setion “they love me” the text is falling below the pictures. It seems for some reason the width on the container div is not being understood. Perhaps its something else. I am really not sure what is going on here and would very much appreciate any advice anyone has. Thank you!!
August 31, 2013 at 1:45 am #148638Paulie_D
MemberNot seeing any issues in Chrome.
August 31, 2013 at 6:17 am #148650Paul808
ParticipantUnfortunately, I am seeing the issue in Chrome on both a Mac and PC. Perhaps try loading the page with your browser open to the full width of your screen. Take a look at how the “i got skills” and the “they love me for them” sections are laid out. Now without reloading the page resize your browser to the smallest width and then open it back up to the largest width. When I do this I am experiencing a bug with the layout.
August 31, 2013 at 6:25 am #148651Senff
ParticipantOK yea I was able to reproduce it by resizing the browser really small and then resizing it to full screen again.
Although I can pinpoint the exact issue, I do think it has to do with the fact that you use percentages about everywhere. It should work properly, but it doesn’t. Perhaps there are percentages of percentages that come into play, especially when you use percentages for padding.
August 31, 2013 at 9:43 am #148655Historical Forums User
ParticipantI can no longer see the issue.
August 31, 2013 at 2:22 pm #148673Paul808
ParticipantI tried changing the padding from a percentage to pixels but no luck. The issue still exists. On a smaller screen the issue with the “I Got Skills” section sometimes does not occur however the issue with the “And They Love Me For Them” section always occurs (in Safari and Chrome). Load the page with your browser at full screen. You will notice the reference photos are to the left of the quote. Now close your browser to the smallest width you can and reopen it to as wide as you can. You will see the photos are now on top of the quotes.
I have really struggled with this page. Any advice would be greatly appreciated.
August 31, 2013 at 2:33 pm #148675jurotek
ParticipantDid exactly as you said and images are left of references not on top
August 31, 2013 at 4:09 pm #148677Senff
ParticipantQuick solution: give “quote” a width of 83% instead of 85%.
Long explanation: definitely something to do with percentages. At one point I resized my browser fully and then I noticed that the div
max-width
had a full width of 1040, but with the padding of 5% on both sides, you would expect there would be 936 available. However, the calculated value was only 914 — with padding on both sides being 63.No idea why, cause as far as I know, 5% of 1040 is 52.
So then the two elements inside got a width of 15% and 85% (of 936). In pixels that should be 140 and 795.
However, the calculated values were actually 137 and 782. I get the 137 (cause that’s 15% of the actual 914), but the 782??
Riddle me that.
Having said that, I’m not a big fan of placing things next to eachother, and give them a TOTAL percentage of 100. I’d rather go to 99% or 98% even, to avoid situations where rounding errors occur.
Example: one flexible-width parent div with two 50% child divs. If the parent would have an odd number width, things might go wrong sometimes. Let’s say parent is 101 px, then both inner divs would be 50.5 pixels — some browsers round this to 51; and then it won’t fit in the allocated 101 anymore.
Sorry for the long post.
August 31, 2013 at 11:43 pm #148688Paulie_D
MemberFrankly, this is such an edge case…(I mean who is actually going to resize their browser all the way down that far and then expand it again?)…you are probably putting more work into solving it than is ever going to be required.
Sometimes, good enough is good enough.
September 1, 2013 at 12:52 pm #148750Paul808
ParticipantActually I saw this problem as fatal. I’m not sure everyone saw just how bad the problem was. Anyways, I posted the issue on the stackoverflow forum as well. I got a lot of suggestions but the one that finally worked was by wrapping each pic/quote combination and the bars in the skills section in a wrapper div with a width of 100%. Thank you very much to all of you for your suggestions!
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.