Grid 960 - columns too big, causing wrapping - 960.gs

I might be breaking the 'rules' with this, but for my 960 grid system, I have a few columns that I add a right-border style to them. This has the effect of making that column 1px too large. Thus, if I have a full set of columns, the one on the far right overflows into the next row. This is obviously not desirable.
I 'fixed' this by manually reducing the column's width by the same thickness as the border - 1px. This has worked wonderfully.
The problem is that I just did a demo of my site to a colleague and when they pulled up the site, there were still overflow issues. Columns that looked fine on my computer - a Mac (in Chrome, Firefox and Safari) had the overflow issue on their Firefox browser (running Windows 7). I tried remoting into a Windows box in their office and viewing the site in Firefox and it works fine.
My question is: how do I go about ensuring that what looks right on my computer will look right on someone else's? How is it possible that the same site viewed in the same browser on two different machines both running Windows 7?

To keep the container that has the border from overflowing, wrap it in another container.
For example:
<div class="grid_4">
<div class="div_with_border">This is the container with the border</div>
</div>

Related

Images sometimes wrong size only in Chrome mobile

EDIT: Setting the containing divs' height and width to rem sizes instead of em seems to have eliminated this problem. I don't know why. I tried replicating the code in CodePen to see if I could isolate it but it doesn't happen there, so I'm just hoping that someone has seen something like this before and can give me an idea of why this may be happening.
I have a block of images that renders sort of like a table, only it's not. It's just a bunch of inline divs containing img tags, and I allow the divs to collapse according to their default behavior when the page resizes, because it works fine, just as long as I set a min-width to make sure they remain at least two columns wide.
My problem is that some of the images sometimes load as larger than they should - even though the containing divs have explicit height and width set (the images are set to height: 100% and width: 100%). This happens only in Chrome mobile (at least of Chrome, Firefox, Edge and IE on PC and Chrome and Firefox mobile), and yet sometimes it works - you can keep refreshing and see issues with different images, and sometimes they're all fine. Firefox mobile renders it fine every time.
So of course I plugged my phone into my PC to load up Remote Devices in Chrome devtools and try to investigate - but as soon as I connect to the Remote Device in devtools, the pictures on the phone instantly resize into their correct positions right before my eyes. Does anybody know why this might happen or what I can do to get them to look right on every load?
You can to use the bootstrap class; class='img-responsive'
see example below:
<img src="images/footballkids.jpg" class= 'img-responsive' id="img1" onmousemove="cssmouse();">

How to get a row to stack neatly in a site that uses Zurb-Foundation

I have a site that is a work in progress ...
It uses Zurb's Foundation ...
There is a row with four images that are spread across evenly ... (Children, Counseling, Senior Services, & Support Groups)
When you resize the window, it stacks two by two in FF, and Safari on Mac. (haven't checked IE yet).
Anyway, the problem arises in Chrome. The four images don't stack neatly two by two as they do in other browsers.
I've gone over everything with a fine-toothed comb and still am baffled as to why it's doing this.
It also does this on my iPhone with the default browser (ie, Safari), and that also bothers me to no end because that's Safari, and yet it plays nicely on the desktop version).
Anyway, any ideas why it's not playing nicely in Chrome?
Thanks in advance for any ideas, suggestions, etc ...
Removed link as the problem is fixed.
EDIT 1
Forgot to mention that this uses Foundation's version 4.
I believe you have two issues:
The text above the images is not scaling properly. When I remove the <h3>'s it corrects most of the issues.
The images for "Children & Family" and "Seniors Services" have the width and height attributes set with in the <img /> tag. When I remove the the width and height it fixes the rest of the issues within Google Chrome.
I hope that helps.

Google Chome - Sidebar looks broken ONLY on some computers

I currently have a WordPress theme online and appears to work fine but one of my clients noted that the blog page layout is broken in Google Chrome. The sidebar appears right underneath the page content. So I checked his website and my demo and it does indeed look broken. So I have spoken to another programmer and he says it's not broken and he uses the latest version of Chrome too. I have never encountered such an issue, it works for some but not for others.
EDIT: The issue has been fixed with thanks to Joseph Erickson.
Looks like it has to do with the width of the #sidebar. If you shrink it just a little bit, it'll fit properly.
Why is this happening? Who knows. These little pixel shifts with floats can be hard to track down. I would recommend not trying to fit everything so snug together and allow some wiggle room when putting two fixed-width floating elements inside the same element.

DIVs won't resize for a width of less than 420px

I'm having a little problem with the auto-resizing feature!
I've already proficiently triple-checked (with the search-tool) that all my width-settings are set to %. There's nothing with a fixed width in the whole website. (Well, in fact yes, but nothing bigger than 100px, and in such case, not more than one per row).
But still, if I reisize the browser's windows by less than 420px width, the width of my body (html-body, of course :P) will stop by 420px and the well-known h-scrollbar appears.
Any ideas? Is there some sort of default-minimun-width? I've tried by setting a smaller body's min-width but with no results.
Just in case that's somehow helpful: the website is composed of an index (in html), two sets of three jQuery-script and one CSS files, which are alternatively wrote to the project when the site loads (one for desktop-browsers, one for mobile). I've already tried building the sites separatedly, with no better results.
I think I resloved problem with Firefox. I think FF allows to shrink website to minimal width which need toolbar with website address, searcher, bookmarks and so on. I was testing on CSS tricks which is great site if comes to mobiles :)
At the first screen at 280px width toolbar stops shrinking as the website. Sometimes I have there also Firebug icon or Fireftp icon which makes my sites stop shrinking earlier.
But right click on toolbar and unchecked Toolbar menu. Menu should hide and site still shrinking on resize. Here is Firefox and Chrome and as you can see they are quite similar as comes to minimal width.
If anyone will notice that this soultion is wrong and didn't work, please give me a feedback :)

Body Content div Alignment Problems In IE6

I am having alignment problems with a website I'm designing on IE6. It works great in all browsers (Firefox, Opera, Chrome, Safari, etc.) including IE7, IE8 and IE9. Basically, I troubleshooted and found that there is 25 extra pixels that are being added to either the main body of the page or the right body column of the page (these are divs #body_box or #right_box in the JS Fiddle below). They should be displayed inline but instead the #right_box overlaps and is displayed underneath #body_box and floating to the right.
The way I know this is that I expanded the div #Complete_Layout to 1025px (as opposed to the 1000px that it's set at now) and that's when it worked in IE6. I tried 1026px and 1024px and it didn't line up. I checked the dimensions of the background images which are accurate and I even attempted to change the width of the two divs (body_box and right_box) to percentages (75% and 25%) but it gave the same result. I'm out of ideas on what else to try.
http://jsfiddle.net/cRcXq/
It should be noted that I am doing this in PHP and the body_box and right_box sections are part of include files (don't know if that changes anything). I've added a comment on the HTML of the JSFiddle on where index.right.php begins. Thanks for the help.
This looks like the infamous "IE 6 box model bug," a well-known difference between IE 6 and other browsers from the time. Essentially, IE 6 counts the padding and the border as part of the width and height of an element, but any other browser from that time follows the same model as newer browsers.
Seriously, though, why are you designing a website for IE 6? It's ten years old and insecure, and it has less than 1% market share in the US. Microsoft has put up a website devoted to getting people off of IE 6. You wouldn't write code for Office 2000, or Mac OS 9, or PHP 3, so why are you developing code for a browser that was popular around the same time as those products?

Resources