Friday, August 28

Setting height of a div inside a td to 100%

Recently came across this issue in a table based layout (old code) where there was an empty div which needed to fit to the height of the td. What would happen now is the div would take up just as much height as the content inside it.

Searching through various forums (read : stackoverflow), I could not get a sturdy solution, however it appears we need to apply the div's parent a height of 100%. However doing so also did not work in my case considering that there many levels of cascading table's and td's. So to fix the issue, what i did was gave an explicit height of 1 to the most parent td.

<td class="parent" height="1" width="100%">
   <table ....>     
      <!-- more code here-->
  </table>
</td>

Monday, August 24

Curd Salaad

This time I had to try something different, then the earlier Chicken salad. Also, something very quick and easy and at the same time nutritious and tasty. I had been to the mall and bought myself "Dahi" or Curd. Actually I wanted to buy Yogurt, and thinking that Dahi is Yogurt I bought 2 packets. But it is today that I realized there is a difference between Yogurt and Curd. Anyways, Curd is healthy too. So lets get started with the recipe.

Ingredients
1) Chopped Cucumber
2) Chopped Tomato
3) Finely Chopped Cabbage
4) Boiled Corn
5) Dahi/Curd
6) Sugar
7) Pepper and Chaat Masala for taste

I ensured that all the ingredients are finely chopped because it becomes easier to chew and also you get a good mixture of everything in your spoon. The curd gives you a good flavor and hence good taste.

Mix all the ingredients well. Make sure you have boiled corn, it gives a very good flavor as well as color to the salad. Add 1 spoon of Sugar it gives sweetness as well as it tastes very well. Add pepper and chaat masala as per your taste. Now add a lot of Curd to the mixture, ensuring that there is no water in it. Mix well and refrigerate it for half an hour.

Enjoy your salad direct from the refrigerator, cold.




Saturday, August 22

Egg Bhurji - Good morning!!!

I've had Egg Bhurji or what we call here the "Anda Bhurji" several times but I never took time to understand the recipe. However today, I was in a mood to prepare my own breakfast, so with help of my Mother, here is a delicious recipe of Egg Bhurji.

Ingredients
1) 1 Finely chopped Onion
2) 1 Chopped Tomato
3) Chopped Spring Onions
4) 1 Green Chili, chopped
5) 2 Eggs
6) 1 table spoon Butter
7) Pepper and Salt for taste

Alrighty, lets get started.
Heat the Pan for some time, around a minute or so and then add Butter. You can also add oil or ghee, but I like to cook in Butter, because of the taste. After about 2 minutes when the Pan is hot and Butter melted, add chopped onions and green chili. Stir for some time. I like to cook the onions until they are light brown. Add the tomatoes and spring onion to the mixture.

My mom added a handful of chopped spring onions and I was surprised to learn that they loose the size and become kind of small. Also it depends on the taste. I like Spring onion, so adding a lot of quantity was  fine with me.

Once you have the mixture stirred very well and cooked, add the main ingredient, i.e the Eggs. So what we did was, we put the eggs just like how we prepare an omelette, and covered it with a lid. Waited for around a minute and then we started scrambling the eggs and thoroughly mixing. I did not want the overcook the eggs. After stirring for another 30 seconds, turn off the gas and lid the pan. Let it wait for some time. Serve hot with chapatis/Roti or Brown Bread.


Sunday, August 16

Chicken Salad, just like you get it at Subway - but much better and way too cheaper.

I had once eaten a Veg Subway salad and not only was it tasty but it was damn costly. Mc Donald's and Subway are some of the western brands that are here in India and however they have very good items in Menu, they are definitely not worth my pockets. I'll be frank, but the kind of quality and the customer service that they provide is by far the worst when you compare to their parent company in US. The added taxes may burn a hole in your pocket. Anyways, I can go on and on about the negativity, but today's blog post is about preparing a Subway Chicken salad at home. So let's get cooking.

A subway salad will have 1) Cucumber 2) Tomato 3) Black Olives 4) Green Olives 5) Cabbage 6) Onion 7) Capsicum 8) Different kinds of Sauce such as onion, barbecue, mayonnaise etc

What I believe is that it is the Sauce that brings in all the taste in the salad. That is it, the above ingredients as per your choice and a 5 min preparation time will get you a Subway salad, for about 180INR for Veg and about 320INR for non veg. 

I love the black olives and I always ask for some extra during the time of preparation. And here in India, since they are way to costly, I think the "chef" (I don't know what the term they use for the guy who prepares your "Sub") is instructed to quietly ignore the customer request and in worst scenario just add 2-3 olives if at all required. Sometimes the olives are missing from the bucket and you cannot do anything about it. 

Alright, back to our Salad preparation. I got the following ingredients from the mall.
1) Cucumber
2) Tomato
3) Cabbage
4) Mustard sauce
5) Mayonnaise 
6) Boneless Chicken
7) Chili (The big one, that are normally used to make bhaji)
8) Sweet Corn
9) Coriander


Method
Boil your chicken with Ginger garlic paste for about 20 minutes until cooked. No oil required.
Cook the sweet corn in a pressure cooker for about 10-15 minutes.
Slice the Cucumber and Tomato, very thin. The salad taste good when you have a big slice of these instead of thin chopped.
Chop the green chili in medium pieces.

Separate your corn, make sure you have them nicely removed and they are in intact pieces, they should not be smashed. They taste good and also look good in the final product.

Put the corn in the vessel and mix finely chopped cabbage. Stir well with your hands. Then add the boiled chicken. I mashed the chicken pieces into small chunks, so that it mixes well with the salad. You may want to cool the chicken down to room temperature before mixing it. Then add the chopped green chili. 

At this point, I like to mix everything well and add Sauce. So add 2 table spoons of Mustard Sauce and 2 Tablespoons of Mayonnaise. I then added 1 table spoon of Green Chili sauce and Red chili sauce each. Mix them well. 


If you noticed, I haven't added onions because I don't like them raw. Also I did not get olives from the mall and I did not want to hunt down in other stores. So I skipped them.

Once done mixing, add the Sliced tomato and cucumber to the salad. I like the taste of Tomato as is, so I made sure I did not mix it well with the sauce. Once done, stir it twice or thrice and add some lime and tomato sauce for taste. Sprinkle black pepper for taste. And then add coriander. As my mother says, coriander is the king of the vegetables and to be honest, it actually gives a damn good taste plus makes your dish smell awesome. We normally add coriander in almost all the dishes that we prepare. 

That is it, your salad is ready. Enjoy!!

Let me know in your comments if you have any suggestions or any other such healthy recipes. I would definitely love to try them at home. Until then eat healthy, stay fit. Adios.

Alright for those who are interested, the above salad made at home costs me around 40 bucks (because I added about 100 gms of chicken). I got the Mustard sauce for 45INR and the Mayonnaise sauce for about 75INR I have used only 2 table spoons in the preparation and I think I can make more 5-6 servings of the salad from the remaining. I have used one medium Cucumber and 1 Tomato. It would have cost me 2INR each. Corn cost me 8INR.

So on the extreme side of calculation, It just cost me about 35INR - 40INR. See how cheap and at the same time healthy it is.

Sunday, August 9

White Space between HTML elements

Working on a dojo project recentaly, I came across series of buttons that had unnecessary white space. At first, I strongly believed that it was dojo that was causing the problem, so googled it out with dojo in the keyword. It took a little time (embarrassed) but I got to know that there are unnecessary white spaces between HTML elements that causes such issues. Amused. I had to deal with such whitespaces for images earlier but setting display property worked. However, I had never thought of the reason why such behavior exist.

Google and Stackoverflow to rescue.
1) Remove the white space from your code. So all your HTML tags start and end without any white space. This leaves with no indentation. For eg
<a>Some text</a><a>Another text</a>
See the above code, there is no literal spacing between two tags. This should work in all browsers

2) Setting the font-size to 0 also works. But it has some limitations and bugs when used with other  css properties such as @font-face and font-size in em

3) Set a negative margin in css to those elements. I personally find it weird, but this is also one of the solutions.

4) Using float property on such elements will work too. Yes it does, and this also seems a good solution.

5) Can I wrap my loose HTML tags within some div or span or ul > li (?) I wonder because I used to properly format and write semantic code, I had never encountered such issue earlier. I feel this is the best solution.

The best resource and in-detail discussion can be found at css-tricks.com