• Follow me on:

Thursday, November 23, 2017

Vertical align images and content in middle of a div

Center aligning CSS is simple when we need horizontally, but vertical alignment is not simple as horizontal.  We can simply use text-align: center for inline elements and margin-left and margin-right values auto for centering horizontally.  In our table based layout days we used valign attribu
te but for div based layouts vertical-align attribute is there but useless.  It doesnt work as it reads.  Vertical-align is similar to valign, it also applies to table cells only and it works with inline elements.
This vertical-align doesnt work with block level elements like a paragraph inside a div.

A common rule which you can use and get results is as follows, using pseudo selector it can be achieved. Simple CSS rules to vertical align your elements in the middle of a div.

0


CSS Rules:
.imgCont{ text-align:center; height:300px; border:1px solid red;}

.imgCont:before {    /* create a full-height inline block pseudo=element */
    content: ' ';
    display: inline-block;
    vertical-align: middle;  /* vertical alignment of the inline element */
    height: 100%;
}
.imgCont .fpImage {
    display: inline-block;
    vertical-align: middle;  /* vertical alignment of the inline element */
}

There are few methods depending on your requirement.

1

When you want to vertically center a single line of text simply use line-height .  line-height value should be larger than its font-size.

HTML:
<div id="parent">
    <div id="child">Text here</div>
</div>

CSS:
#child {line-height: 200px;}

You can use any value in place of 200px whatever suits your requirement.
Same method can be used for image, with adding another line of  CSS.

HTML:
<div id="parent">
    <img src="image.png" alt="" />
</div>

CSS:
#parent {line-height: 200px;}
#parent img {vertical-align: middle;}

*Line height value should be greater than the height of the image.

2

Vertical-align works with table-cells.  We can display our element as table and table-cells and then use vertical-align to middle the content.
HTML:
<div id="parent">
    <div id="child">Content here</div>
</div>

CSS:
 #parent {display: table;}
#child {display: table-cell;vertical-align: middle;}

Content can be dynamic here, it works with multiple line of content.  If it doesnt works in all browsers just add "display:inline-block;" to the child element.

3

This style is usually used for the popups, which we use to center in the middle of the screen.  Child can be centered both vertically and horizontally. "position" is must for both parent and child.  relative for parent and absolute for child.

HTML:
<div id="parent">
    <div id="child">Content here</div>
</div>

CSS:
#parent {position: relative;}
#child {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 30%;
    width: 50%;
    margin: -15% 0 0 -25%;
   }

You should have noticed value of margin-top is -15% that is half of value of height (30%) and value of margin-left  is -25%  that is half of value of width (50%).

Share Your Solutions

Thursday, November 2, 2017

Places to visit in Puducherry

I read alot about Puducherry French colonials and all, always wanted to visit this place.  I planned a small trip with my family packed my bags and reached. Located along the Coromandel Coast of Bay Of Bengal.  Pondicherry or Puducherry is a city and capital of the Union Territory of Pondicherry and is one of the most popular tourist destinations in South India.  It was French capital of India until 1954, its French legacy is still preserved in its French colonial settlement quarters with tree lined streets, mustard-colored villas and boutiques.

Like all other South India tourist spots you will get bikes on rental and explore all your own.  I tried to book online but my good luck was the payment option was not working so I googled for local rentals and I was surprised to see that its one of the major business in Puducherry.  Where ever you land in Puducherry just hire an autorickshaw and ask him to drop you at Chetty Street, Mission Street.  You will get many shops and garages who provide this service.  Cost depends on the type of vehicle you select.  I rented a scooter and for 3 days it was my companion.  It charged me Rs. 200 per day.

You will easily get on google but still I am sharing the number from where I took on rent.
V. Ambal - 9500889275, 9159978080, 7639818080, Mission Street, Chetty Koil Complex


Most of the places of interest are near Pondicherry beach.

Basilica Of Sacred Heart Of Jesus
2.5 Km from Pondicherry bus station and 100m from Pondicherry Railway station.








Pondicherry Beach / Promenade Beach

3.5 km from Pondicherry Bus Station, also known as Rock beach (coz rock along the beach), Promenade beach (coz Hotel Promenade is there adjacent to the beach).  It is 1.5km long stretch between War Memorial and Dupleix Park.




Most of the places of interest are all around this beach area and Goubert Avenue which is adjacent to this beach road.

French War Memorial
3.5 Km from Pondicherry bus station, on Goubert Avenue or you can say Pondicherry beach road.



Mahatma Gandhi Statue
At a distance of 3.5 km from Pondicherry Bus Station, The Statue of Mahatma Gandhi is located on the beach front of Pondicherry.  Most of the cultural activities throughout the year are hosted here at this square.

Statue Of Dupleix
At a distance of 3 km from Pondicherry Bus Station, The statue of Joseph Francois Dupleix is situated in children's park on the beach road.


Bharathi Park / Government Park
At a distance of 3.5 km from Pondicherry Bus Station. Its right opposite to the Gandhi statue in beach front. The Aayi Mandapam or the Park Monument is a famous monument which lies at the center of the park. In past, Aayi Mandap was the main water source for Pondicherry town.



Raj Niwas
At a distance of 3.5 km from Pondicherry Bus Station, Raj Niwas is the official residence of the Lieutenant Governor of Puducherry.  Its adjacent to Bharati Park.


Old Light House
At a distance of 3 km from Pondicherry Bus Station, The Old Light House is one of Pondicherry's most famous landmarks and is situated on Goubert Avenue.  Right in front of Pondicherry beach.


Church Of Our Lady Of Angels
At a distance of 3 km from Pondicherry Bus Station, The Church of Our Lady of Angels, also known as Eglise de Notre Dame des Anges Church is one of the popular churches in Pondicherry.  Situated on Goubert Avenue.  Right in front of Pondicherry beach.


Romain Rolland Library
At a distance of 3.2 km from Pondicherry Bus Station, Romain Rolland Library, formerly known as Bibliotheque Publique, is one of the oldest Libraries in the country and the biggest in the Union Territory of Pondicherry. Established in the year 1827, this library has been named after the French scholar - Romain Rolland.  Adjacent to Bharati Park.





Sri Aurobindo Ashram
At a distance of 3 km from Pondicherry Bus Station, Sri Aurobindo Ashram is a famous spiritual community (ashram) located in Pondicherry. Founded by Sri Aurobindo and Mirra Alfassa (The Mother) in 1926. The ashram is also the place of Samadhi of Sri Aurobindo and The Mother. 


This ashram comprises several buildings and there are around 1,200 members along with 400 students living in this center. The ashram contains a library, printing press, playground, art gallery, a dispensary/nursing home, dairy, farms and guest houses. Children below 3 years are not allowed. Prior permission required for Photography.


Manakula Vinayagar Temple
At a distance of 3 km from Pondicherry Bus Station, The Manakula Vinayagar Temple is one of the famous ancient temples dedicated to Lord Ganesha and is a popular pilgrimage site in Puducherry.



Manakula Vinayagar Temple was in existence before the French came and settled in Pondicherry and the idol of Lord Ganesha is locally known as Vellakkaran Pillai. The French Jesuits and missionaries tried to demolish the temple several times, but every time local population saved the temple.


Pondicherry Museum
At a distance of 3 km from Pondicherry Bus Station, Pondicherry Museum is situated adjacent to Bharathi Park and is known for its unique collection of sculptures. Furnitures and other household appliances used then are also displayed here.



Ousteri Lake / Osudu Lake
At a distance of 10 km Pondicherry Bus Station, Ousteri Lake, also known as Osudu Lake, is situated at Osudu Village on Pondicherry-Villuppuram Road. Spread across 390 hectares, the lake is situated between Pondicherry and Tamil Nadu.  Boating facility is available here.



Church Near Osudu Lake
On the way to Osudu Lake you will find this beautiful church.  Its just 500m from the lake.




Serenity Beach
At a distance of 8 km from Pondicherry Bus Station, Serenity Beach is close to East Coast Road (ECR). It is a clean, calm and less crowded beach with very few restaurants on the beach front. This beach offers several adventure activities like surfing, boating, canoeing and kayaking. 




Immaculate Conception Cathedral
At a distance of 2.5 km from Pondicherry Bus Station. Founded in 1686, the Immaculate Conception Church, also known as Eglise de Notre Dame de la Conception Immaculee, is located on the Church Street in Pondicherry. 


Botanical Garden
At a distance of 1.5 km from Pondicherry Bus Station and around 1Km from Railway station.  You can proceed on the same road on which Basilica Church is there you will reach Botanical garden. The Botanical Garden is located south of the New Bus Stand and is one of the top Pondicherry Tourist Places. It was established in 1826. There is also a well maintained Aquarium in this garden.




Chunnambar Boat House
At a distance of 6 km from Pondicherry Bus Station, Chunnambar Boat House also known as Plage Paradiso is famous for its backwaters and it's a popular boating venue and is. Located on the Cuddalore main road, the backwater is situated at a point where the Chunnambar River meets Bay of Bengal. 


Matrimandir - Auroville
And last but not the least most famous place to visit in Pondicherry Matrimandir.  Thousands of people visit everyday here. At a distance of 13 km from Pondicherry. It lies on the East Coast Road and was founded by Mirra Alfassa in 1968.  The structure was designed by the French architect Roger Anger. The purpose of Auroville is to build a world where people can live peacefully, irrespective of nationality, colour, caste and creed.








Soil from over 124 countries was placed and mixed inside a lotus shaped urn, symbolizing universal oneness. Auroville was built to welcome people from all over the world to live together and explore scientific, educational, cultural and spiritual pursuits as per the Auroville charter.

The town houses the Matrimandir (Temple of the Divine Mother) at the center. It is a one hundred foot high spherical structure with the lotus bud shaped foundation. Its outer walls are decorated by gold-encased discs. The structure has an exquisite meditation chamber of white marble floor and walls. Daylight entering from the roof is directed to a huge crystal globe which illuminates mysteriously providing a focus for meditation. It has around twelve gardens, lakes and an amphitheater. The 12 gardens around the Matrimandir were named by the Mother: Existence, Consciousness, Bliss, Light, Life, Power, Wealth, Utility, Progress, Youth, Harmony, Perfection. Each are symbolised by a flower.



The Visitors Center provides a pass to the Matrimandir. There is also an art gallery at Visitors Center along with a video theatre (Timings: 10.30 AM, 11.30 AM, 2.30 PM, 3 PM & 3.30 PM). There is also a cafeteria and some boutiques selling products manufactured in Auroville.  Its difficult to get permission for entering into the Matrimandir and meditate.  You need to take prior permission.  You have to come here in person before 4 days and get the passes and permission for visiting inside the Matrimandir.  


Timing for issue of passes: Weekdays: 9.30 AM to 12.30 PM and 1.45 PM to 4 PM. Sundays: 9.30 AM to 12.30 PM.

Ebroidery Private House



Few Random Clicks












Wednesday, November 1, 2017

Rupin Pass

Day 01
Dehradun to Dhaula -  426 kms

Our train Doon express was 5 hours late. We reached Dehradun at 1130 hrs,our driver and our tenth member my friend Gajendra were already waiting for us at DDN. Hiraks friend came to meet us at railway station and brought lunch for all of us. We had our lunch at Judo and through Sankri, checkpost at Netwar we reachd Dhaula at 2215. Our guide joined us at Netwar. Our guide already arranged a home stay for us at Dhaula. After some briefing and introductory speech we commenced our dinner and slip into our sleeping bags.



Day2
Dhaula to Alikhadd - 11kms
Start at 0830 Hrs and Ends at 1330 Hrs

Weather was not in our favour. Moment we finished our breakfasts it started raining. Still our team leader sticked to the plan and left Dhaula at 0830 hrs. Rain wasnt heavy so our windcheaters were enough to resist, but few of us took out our Ponchos as well.






Trail after 4km is bit tough, inclination results in heavy breathing. This was a trail where we met a local lady Mrs Meena Rawat, coincidentally she was our guide Yogaraj's love interest in past. To tease Yogaraj that lady was flirting with one of our member, and we had great fun teasing him.





Trail today was moderate through dense forest, through small villages. Apple, aadun and akhrot gardens on both side of the trails. We saw tents and banners of India Hikes and Biket adventures at Sewa village. There was a beautiful temple made of wood around 40ft high wooden structure. Many shields n cups hanging over the main door of temple and many coins pressed on the walls.











We had our lunch at Sewa. It was a perfect camp site but our guide Yogaraj planned something else for us, he said, "not here we are going to camp at Alikhadd." Few more kilometres of down trail through the woods and suddenly we hear the sounds of running water. Few more steps we came out of the trees and standing on the banks of a stream cascading over huge boulders. Its a perfect stream for rafting. Its Rupin river. We reached at 1330 hrs and pitched our tents there. By the time we reached sky was clear no more clouds, sun was smiling at us, we tried to dry all our wet clothes and ponchos. Best thing happned was Golden Trouts. Few localites were catching fish they gave us fresh golden trouts. After a nice warm dinner we all slip into our sleeping bags.



Day 03
Alikhadd to Jakha - 13kms
Start at 0830 Hrs and Ends at 1530 Hrs

Beautiful sunny morning to start. First few kilometres Up trail through woods. We reached a road point from where u can get vehicles. This part was the easiest trail of around 4km which you can cover as fast as possible.





Again after few kilometres we were back in woods and streams. We left the road head near Barota village, there are few houses in that village and an old tea house with a shop. One thing noticed here was the cost of items, either at MRP or less than MRP, even in that remote village they were not charging extra amount from customers, otherwise at other tourist places they will charge you extra amount in the name of freezing charges or carrying charges etc etc.






Few more metres and again we were back on road head. This was one of the biggest village in that area, many shops and state govt office was there. Our guides love interest who left us at Sewa also reside here at Jiskun. A small drink break and again back on trail. From this village 1km down trail and u reach a beautiful wooden bridge. We had our lunch here, meanwhile our porter friends were busy collecting Linguda. Linguda is a local plant used as vegetable.







They served us in dinner. Trail after lunch was too tough, inclination was too much. We reached Jakha around 1530 hrs. Our guide arranged a homestay at Jakha. After little rest few of us decided to hang around the village. There is a beautiful temple at Dhara around 300m from Jakha. Two wooden structured temples side by side studded with coins, shields and trophies. Cricket is pretty famous in that part, all those shields and trophies are from different cricket tournament and matches held there. Spent an hour in that village Dhara ...click click click and then back to pavillion.



Hot maggi was served as evening snacks. Followed by health checkup , antakshari and for dinner local veggie Linguda collected from jungle earlier that day.

Day 04
Jakha to Bhuranskandi - 5.5km
Start at 0830 Hrs and Ends at 1230 Hrs

Today's target was Dhanderas Thwatch. 00Km from Jakha. We left Jakha around 0830hrs. Day started with tough inclination, as soon as we were out of the village trail was moderate to walk. After few kilomMeter we saw a small valley river passing by and a small wooden bridge over it. Guide signed us to proceed on that trail. Coming down the trail was bit tough, trail...actually it was not a trail it was edge of the mountain from where u have to go down and reach that bridge to crossover the river stream.




After few more metres of crossing the river we found a tea stall which is also a campsite. Bhurans kandi starts here...we took a short tea break and again back on track. Suddenly it started drizzling, we were under woods somehow proceeding but it turned into heavy shower. We were lucky to get a shelter there, a small ruined hut at right time right place.



 Looking at the shower guide and our team leader decided to camp at Bhuranskandi. Due to bad weather we were forced to camp here. Todays target was Dhanderas thwatch but we pitched our tents here. It was a laziest day small trail to walk, lot of evening snacks, a heavy dinner and early bed ..ah not bed...sleeping bags.

Day 05
Bhuranskandi to Upper waterfall 08km
Start at 0730 Hrs and Ends at 1300 Hrs


We left early as weather was unpredictable. We left Bhurans kandi around 0730 hrs. Just 02 km trek and we reached India hikes camp site of Dhanderas Thwatch. Awesomeplace to camp...small valley with mountains both side and waterfall in front where we have to reach.









Ascending trail comprising of small streams, glaciers and snow patches. From that valley to the top of the water fall you can see in the picture above. After crossing 3 glaciers we reached lower water fall where we had our packet lunch, then we proceeded towards upper waterfall. We reached upper waterfall around 1300hrs.Beautiful place, already there are many tents pitched by India hikes and biket adventures team. We pitched our tents beside them. We gained a lot of altitude today as we covered two days trail in one day. We all were so hungry that we had second lunch today. Day ended with lot of photography and nice warm dinner. By evening weather changed and showered all night.

 Day 06
Upper waterfall to Sangla kandi 16kms
Start at 0630 Hrs and Ends at 1450 Hrs

 Next morning I unzipped my tents gate and it was all white, whole ground all the tents, snow everywhere. Last night rain and drop in temperature resulted this beauty. I started shouting and calling everyone. Immediately took out my camera and started clicking.






Today was our final day to reach the highest point of Rupin pass. We started around 0630 hrs and the ascend was too much towards Ratapheri. It took us one hour to reach Ratapheri. Weather condition worsened completely covered with black clouds and thundering. It can rain any time, as we reached Ratapheri clouds broke and it started raining actually not raining it was snowfall. One of the Best day of my life never witnessed so much of snow. Walking on the snow during snowfall cant explain inwords how i was feeling. As we reached near the Rupin pass highest point was just 300 metres ahead but the ascend was around 70 degree. It really showed us how tough it can be walking on the snow with your back pack in full capacity. We reached top of Rupin Pass at 0950 hrs. The weather today wasn't clear like we found in final day of Ronti saddle. After a small briefing by our guide and offering puja to the mighty lord. We stareted descending. Best idea todescend is to slide. We all enjoyed sliding down, but very careful about your body balance because with backpack its little risky to control. Last part of the trail today was not at all pleasant, completely muddy and slippery. After few kilometres we reached a meadow known as Sangla kandi, pitched our tents. We descended alot today no more high altitude sickness to anybody. Day ended with special dinner with desertdescend is to slide. We all enjoyed sliding down, but very careful about your body balance because with backpack its little risky to control. Last part of the trail today was not at all pleasant, completely muddy and slippery. After few kilometres we reached a meadow known as Sangla kandi, pitched our tents. We descended alot today no more high altitude sickness to anybody. Day ended with special dinner and desert made by Yograj our guide.

 Day 07
Sangla kandi  to Sangla
Start at 0830 Hrs and Ends at 1230 Hrs

 Last day of our trek going to end at Sangla. After a heavy breakfast we start our trek today around 0830 hrs. Trail today was like walking on planes with small ascends and descends. There is a beautiful bridge at the entrance of the village. Actually its not entrance its backside of the village, for trekkers it is entrance. There are many restaurants, hotels, shop even a government hospital is there. Its a town not a village. Pretty nice place to stay for a day or two. Apple gardens, mountains all around and a river are x-factors of this town. Our stay was arranged in Hotel Hansraj. We arranged a grand lunch for our support team. After bidding goodbye to them we returned to our hotel rooms and complete bed rest. Finally our trek ended today. Great experiences, few proud moments standing on the highest point with Indian flag always proud feeling. Once again we completed our trek in time and left with two buffer days we kept for natural calamities. Our return journey bookings were scheduled two days later so we decided to visit nearby places.

Day in Chitkul: India's last village near china border.
Day in Rekong Peo.
Day well spent in Shimla.
All Rights Reserved Jaydharphics Click To Mail Me (+91 9564 5592 84)