Showing posts with label browser. Show all posts
Showing posts with label browser. Show all posts

Friday, November 8, 2013

3 column css layout with center fludic and fixed width left right column

How can we make a 3 column layout where left and right most column are with fixed width while the middle column should be fludic (meaning it consumes the whatever is left on screen now)
Concept is pretty simple: Make two two-column layout and insert one into the other :)
Step 01: Make a  two column layout where right column is fixed width and left consumes the left-over screen space.
.container_1 {
   height: auto;
   overflow: hidden;
}
   
.container_1 .right {
    width: 100px;
    float: right;
    background: #DDD;
}

.container_1 .left {
    background: #CCC;
    width: auto;
    overflow: hidden;
}
<div class="container_1">
<div class="right">right content</div>
<div class="left">left content</div>
</div>
Step 02: Make another two column layout where left column is fixed width and right consumes the left-over screen space.
.container_2 {
   height: auto;
   overflow: hidden;
}
   
.container_2 .left_2 {
    background: none repeat scroll 0 0 #BBB;
    float: left;
    width: 180px;
}

.container_2 .right_2 {
    background: none repeat scroll 0 0 #AAA;
    overflow: hidden;
    width: auto;
}
<div class="container_2">
<div class="left_2">left content</div>
<div class="right_2">right content</div>
<div class="clearfix"></div>
</div>

Step 03: Insert container_2 div in container_1's left column div.
Here is the working example
http://jsfiddle.net/praveen_kumar_sinha/fSf8T/


Tuesday, November 18, 2008

Is there any 'Forward' or just 'Redirect' in RAILS?

I have been thinking from the very start what is the difference between the two? when i just heard this question(refer the heading my dear). and the answer is the 'browser', yes!! the browser...

Redirect means from one controller/action to another controller/action via browser meaning a 302 response is sent after evaluation completes for the first controller/action pair and then the new controller/action is called from the browse( one can see the url changing as a result of this in the address bar)
[this Gyan is achieved by

redirect_to(options = {}, response_status = {})
Redirects the browser to the target specified in options.

&

Forward means hopping to new controller/action from the correct place without going to browser.
but does rails ever legally allowed any thing like forward.. i personally don't think so... (because either i am not aware of it or rails don;t have it) :))

in that case how to implement this forwarding thing(which as such don't exist)
two ways that i can figure it out to achieve is..

1) using "render" i.e by calling some desirable template or other render option(s) for the current controller/action (but issue arises when one need to render action of some other controller, ya ya i know in rails you have your own pilot seat so go ahead :) )

2) is using normal function call i.e calling the action defined as function(with override/non overrides params) and here also drawback is same... but remember to use return after that otherwise DoubleRenderError is for you :)

and quest is on and rest will become history very soon....


Honda Civic & A/C problems.

Hello Friends, Got a post again on to Honda Civic (The good old favorite commuter of mine). This car has been doing great except for so...