Why is my layout broken only in Firefox and IE8 (not 9)? - html

I noticed today that a website that I've completed months ago was not showing well on Firefox and IE8 (works fine in IE9). It's quite old now and I'm pretty sure that I tested browser compatibility at the time but I guess one does make mistakes.
Problem is I can't seem to understand the problem. Basically I have a left floated sidebar with a fixed position but it renders on the right (outside its container) on FF and IE8. I could always build the layout again from scratch (it uses Skeleton Grid system) but would still like to understand the problem.
Example page that's broken on the website.
Try to open it with various browsers and see for yourself. Also, if someone views it right on FF, I'm interested too.
Thanks a lot!
Edit: I'm not asking for a whole debugging. Just if someone knows of this issue.
Edit2: Validator links are irrelevant here. I checked it already and they're basically prefixes for css and CMS-related for html.
Edit3: I fixed it and prepared a kinda complete answer to post but as I'm a new user, I can't answer my own question in the next 7 hours... so here it is:
I just sorted the whole thing out with hints from your answers (thank
you!).
Basically, it's something to do with how browsers handle floats on
fixed elements. Imagine we're dealing with successive "float:left"
element, which is the case in most grid system (960gs, bootstrap,
etc.).
Here's how browser will handle these elements without fixed
positioning: http://jsfiddle.net/cPjdK/ And with float:right :
http://jsfiddle.net/cPjdK/1/
Now what if we have a very long third column and want to fix the first
(my example)? Well it basically disables the floats because fixed
elements are out of the flow. http://jsfiddle.net/cPjdK/9/
So you have to position them absolutely (or with margins in my case)
http://jsfiddle.net/cPjdK/6/
Now what about my website? The fixed elements were floated anymore and
the whole grid system kinda fell apart. Fixing this appeared to be a
long work. But, for some reason, replacing my "float:left" properties
on floated elements with "float:right" basically fixed it. Why did it
fix it? Why was it not working on FF and IE8 but appeared fine on IE9
and Chrome.
I have no idea.
But it looks fine now (after a few tweaks) and I've already been paid
so...
Problem solved but question unanswered, sorry...

You have a FIXED positioned element without giving it any coordinates.
Try giving it something like:
#side-right{
position:fixed;
top:0;
left:0;
}

Related

Aligning 3 divs horizontally with no margin, bug in chrome only

I usually have no problems finding a solution to line up divs horizontally but however this only happens in google chrome.
This page here http://webdesignbird.co.uk/free-quote/ that iv'e just started working on has the issue, the 3 pricing plans should be side-by-side with no margin or white space between them.
If you view the page on firefox it shows the way I intended, but any changes I try to make for chrome then effects firefox.
I could target chrome specifically (after iv'e researched how to) but I would rather find out why this isn't aligning as it does in firefox. Perhaps i'm missing some code. I have only been building websites a year so my code skills are very average.
I cannot find the answer to my problem at the moment and would really appreciate a nudge in the right direction.
Don't know, why it works on firefox, but it seems that you just forgot the float:left on the tier-2-container.
Edit: I got the containers confused.

Causes of difference in padding/margin between Chrome and Firefox/IE (Joomla)?

I am working on a website simkt.com and just moved over to joomla 2.5 after rebuilding the base theme to match the desired look.
Unfortunately, being a novice web developer that I am, I forgot to check out how things looked in browsers other than Chrome. The site is now live, and I quickly discovered that in Firefox/IE that the website is not quite right, and after some adjustments, that when I make adjustments to try and fix the issues, there is around a 5 pixel difference in spacing between Chrome and Firefox/IE (and I tested now in IE 7 and it was.. quite bad).
So, my question is, what am I doing wrong, and how can I go about fixing this?
Using Chrome dev, I reduced the top-padding in rt-body-bg to 0, and in the logo itself, decreased the top-margin to -30 and bottom-margin to -25 and it looks close to what I want, but has a 5 pixel gap between the logo and the menu on Firefox, and in IE the login button starts to move off in some odd direction.
I know some css/php/html but am I am still learning, any help would be greatly appreciated!
Thanks!
Note that different browsers have different default values for the css for the different elements. A good practice when you program design with CSS is to use a reset values in the beginning of the css file. This reset is going to make sure that the unset values will be the same for every browser.
See this link for a css reset code
http://meyerweb.com/eric/tools/css/reset/
Hope it helps
As #Stoyan said, you should be using a CSS reset at the beginning of your CSS file.
You specifically mention margins. I've just had to resolve an issue whereby in our site margin-top was used to position items (not a great idea - blame the previous developers). In IE and Chrome it was fine but in FireFox, because it has a different top margin, it looked bad (items were 30px too low).
I didn't want to use an entire CSS reset because it might have had a knock-on effect for the entire site (fonts were all changed for example).
I used just one item to resolve it, curiously not margin-top but line-height:
body {
line-height: 1;
}

Chrome rendering error with position absolute and css3

I've been wrecking myself trying to figure out what is going on with this big of html. It renders correctly in latest Firefox, Safari and on chrome canary, but normal chrome renders these weird lines and I have no idea why.
I've create a JS fiddle with an excerpt of my code, it's part of a much larger project, but I'm seeing the rendering issue in the fiddle as well as in my app. I've attached a screen shot of what I'm seeing in the fiddle for reference.
Fiddle
Bug screenshot:
The red middle line shouldn't be there as well as the line to the left of "close". This is just one example, as I mouse over the modal I get lines appearing all over the place.
It makes for a less than stellar question as it's difficult to replicate. Resizing the browser helps to show the error. My fiddle has quite a bit of html and css. I don't expect anyone to actually comb through it and fix the issue. I just want to be thorough in presenting the problem.
I've tried looking online but I haven't been able to find anyone reporting the same issue as far as I can tell.
If anyone has any ideas on what may be causing this, how to fix it or point me to a relevant link/SO question I'd be very grateful.
Things I've ruled out/investigated:
- not caused by something else on the page, as I extracted it into jsfiddle and it's still hapenneing. I also removed the body content using the console in my app and it didn't make a difference.
- I dont think the gradients or transitions are causing it, as removing them didn't seem to have an effect
- possibly/probably related to absolute positioning? When I removed the position absolute on the main wrapper element I didn't see this occuring.
- I read that applying a z-index to these elements might help, but it did nothing for these issues.
TL,DR: Why does google chrome, but not canary or safari, show rendering errors on absolutely positioned elements with liberal use of css3 gradients, shadows and transitions?
When I remove the '-webkit-transform: scale(0.95)' on #vfs_uploader and the '-webkit-transform: scale(1)' on #vfs_uploader.visible, it displays fine: http://jsfiddle.net/cjc343/fzqPT/2/
I don't know how this affects Safari or if it has other implications in Chrome, but it does not appear to otherwise affect the layout in the example.

Site displays diff in IE9 than IE8 today

I'm having problems trouble shooting the difference in display between IE8 (works fine) and IE9 for the site:
http://www.exploreolympics.com/
Seems this problem just developed, both browsers had displayed the same two days ago.
In IE9 the right 2/3s (below the header) doesn't seem to fit and is dropped down below the left 1/3 panel.
It seem that there should be sufficient room as I review the CSS... but I must be missing something.
CSS file is here:
http://www.exploreolympics.com/style...in_styles3.css
Best wishes
You have float left on your div with id "l_third" shouldn't this be float:right for this?
I have tried this on ie9 but it doesnt fix the issue. In the situation i would normally have the right content before the left content in your html. Try swapping the div#l_third with div#r_2thirds. Also add float:right to div#r_2thirds.
Ive copied your html to give you an idea of what i mean - http://jsfiddle.net/pjsSn/
This link will be very hard to read. I would suggest using it in notepad++ to see how i have swapped the 2 sections over

Floated div dropping below others in IE and FF

I'm having an odd problem with some floated divs on this page that I'm working on. There are 3 of them across the page, with 1em margins between. In Chrome they line up perfectly, but in IE and FF, the right hand one drops a little - but not all the way below. I thought this might be best described with a picture, please see below:
I can't work out which bit of the CSS is causing this - I've been through the new FF code inspector and highlighted all block level objects with the webdev toolbar but can't see anything that would cause such a drop.
I did wonder if it was something within the JS twitter feed causing it, but I've swapped round the Twitter and "Update" boxes and it's always the right-hand one. I've also tried removing additional elements from the page - everything between the menu and these three boxes.
I must admit, I'm at my wit's end! Can anyone spot something obvious I've missed? The CSS is fairly large, and I'm not sure which bit to show, so I haven't copied it in in, but will do if anyone desires. Otherwise everything can be viewed at http://www.woodexperts.com
Change width: 15.25em in div#main div.tricolumn to width: 15.24em
That should take care of the issue.
I understand that this is a hack, but if IE is the only browser causing problems, you might want to consider IE conditional comments that restrict certain styles only for IE:
http://msdn.microsoft.com/en-us/library/ie/ms537512(v=vs.85).aspx