[TriLUG] CSS question (Re: TriLUG Digest, Vol 1544, Issue 1)

Mitchell Amiano mamiano at nc.rr.com
Wed Jan 25 16:22:08 EST 2012


You should be able to get a better handle on the issue with the IE8 developer tools, which is pretty much the IE clone of Firebug or Webkit's Console. 
<http://www.favbrowser.com/internet-explorer-developer-tools-vs-firefox-firebug-vs-safari-web-inspector-vs-opera-dragonfly/>

You can look at the box model, particularly margin and padding on the second menu/first item to see if it is has different style values from the others.

But the things I would check first are
spurious whitespace in content
an unintentional match to a CSS pseudo class such as :first-child
use of center justification that happens not to matter in the other divs because of the content widths 
anything involving floats
low priority (specificity) selectors 

Element rules that match directly against divs or the elements in them would seem to be ruled out by the problem happening in the unordered list tagging as well.  

Strip down the menu… remove trailing menu items, then the leading menu items, until the problem either goes away or there is nothing left but a minimal menu. 

It is also often helpful to isolate the CSS you need for a particular visual component, from the rest of the site, using class at the topmost level and a reset against that.
Also, a unit-test page can be very useful for design purposes; you get a bit of the benefit by sharing it via an executable paste bin, just because it forces you to isolate the code.  
Helps prevent you from sliding into a mode of boiling someone else's oceans too. 

Also, check with QuirksMode <http://www.quirksmode.org/css/quirksmode.html> before assuming an unfamiliar feature will work with your target browser. 

Mitchell Amiano
(919) 410-8008
mamiano at nc.rr.com







More information about the TriLUG mailing list