19
Feb 10
The task of center-aligning an unordered list (which can’t have its width explicitly set) via CSS comes up every now and then. Logging it here for later.
“For a start you could text-align: center the ul inside the #ul_container_div and display: inline the li instead of floating them left.”
#ul_container_div{ width:100%; text-align:center; }
#ul_container_div li { display: inline; }
Source of knowledge: http://archivist.incutio.com/viewlist/css-discuss/59041
17
Feb 10
Just for purposes of documenting this useful knowledge:
When viewing in Internet Explorer 6 and experiencing the “strange-repeated-text” problem, try applying this CSS to the element containing the text that gets repeated:
float: none;
clear: both;
Knowledge from: http://uxdev.blogspot.com/2008/10/phantom-text-in-ie6.html
4
Dec 09
Got this in my email today. I’m sure we can all relate to this phenomenon.
Thanks “The Oatmeal“
3
Dec 09
Found this little snippet yesterday. I’m not saying that this is best practice in any way, but if you’re looking for a quick fix, here it is:
<meta content='IE=EmulateIE7' http-equiv='X-UA-Compatible'/>
I think this has the effect of enabling “Compatibility Mode” that the user would normally have to turn on.
As a side note, the specific reason I used this was to make a Google Friend Connect widget render properly — there are plenty of posts on the web about those widgets not working in IE8.
20
Nov 09
I just spent the past 36+ hours in bed, with a few minor exceptions (going to the bathroom 3x and eating 2x). I don’t know what I am sick with, probably just a rogue case of fatigue, but here are some tips to help make being sick easier:
- Turn up the heat. Your ability to be warm-blooded is probably weakened. Does it seem like blankets and comforters don’t make you any warmer?
- Wear socks. I heard somewhere that one’s body temperature generally follows the temperature of one’s feet. I normally don’t wear socks when I sleep (I feel they’re not as comfortable as not wearing them). But socks will keep you warm.
- Move your bed away from the windows. You never know if drafts (that you’d normaly be insensitive to) are agitating you. If your bed is right up against the wall/windows, move it away about 6 inches.
- Take a lozenge. For this particular illness, it hurt to swallow. Taking a lozenge provides temporary relief. It is also a mild anesthetic so our mouth will be numb.
- Drink lots of Fluid and take some Soup.
- Avoid touching cold things and wear slippers or socks when roaming the house.
- Flip the pillow over a bunch of times. It’s nasty to reposition your head only to discover that you’ve just landed your cheek in a huge puddle of drool. Flipping the pillow over allows time for the puddle to dissipate.
- Listening to music is agitating. Either don’t listen to any, or listen to soft music like opera or classical.
- Have a glass of water, a box of tissues, and some spittage receptacle nearby. That way you’re not thirsty, blowing your nose on blankets/sheets, and spitting on the floor.
That’s all I can think of for now. Stay well, everyone!
26
Oct 09
When using $this->getSkinUrl(‘path/to/yourfile.html’) inside view (.phtml) code, and you’re getting /default/default/ instead of /default/yourtheme, this isn’t Magento working incorrectly. Check the $argument you send and verify that the target file actually exists.
getSkinUrl() does more than just generate the proper URL, it also verifies that the file exists. If it doesn’t find the file within the store’s /yourtheme folder, it will revert to /default.
12
Oct 09
I had a problem with your PHP code running or executing seemingly twice. To debug this phenomenon, I put some write-to-file code at the beginning of the script. Surprisingly, whenever I loaded my script in the browser, the file would be written to twice despite my one page load.
The problem was that The page I was developing had an <img> in it with the “src” attribute set blank. When the document was fully loaded, javascript was in place to dynamically assign the “src”. This worked perfectly fine in the pre-server-side-logic stage of development so it was an easy decision to begin debugging server-side logic.
The double execute happens when Firefox sees <img src=”" />. Not knowing what source to assign, it sends a request (the second request) to the current path (again) for the image. Therein lies the problem. It’s interesting to note that Firefox is not to blame, as it’s following HTML specification.
12
Oct 09
Magento Widgets allow business users with no technical knowledge to easily add dynamic content (including product data, for example) to pages in Magento Stores. This allows for greater control and flexibility in creating informational and marketing content through administrator tools, enabling intuitive and efficient control of content Read more »
8
Sep 09
If you ever need to programmatically clear Magento’s shopping cart, use the snippet of code below. If you need to clear the user’s entire session, including the shopping cart, shipping information, billing information and chosen payment methods, please refer to the snippet further below.
Read more »