Today, I would like to go over a quick and simple way to allow your users to switch page layouts by using CSS and jQuery.
Today’s web users expect web pages to be increasingly more interactive. To this end, the ability to change page layouts provides your users with a more immersive experience and allows them to consume information more easily, either with a quick gallery view, or a detailed summary view.
Display Switch Tutorial:
Step1. Creating the Wireframe
We will first start out designing the vertical list layout with a simple unordered list which we will use as our columns/rows.
HTML
CSS
*Note I used different shades of grey to achieve the subtle bevel look.
color: #e7ff61;
text-decoration: none;
}
ul.display li .content_block {
padding: 0 10px;
}
ul.display li .content_block h2 {
margin: 0;
padding: 5px;
font-weight: normal;
font-size: 1.7em;
}
ul.display li .content_block p {
margin: 0;
padding: 5px 5px 5px 245px; /*–The left padding keeps the
content from flowing under the image–*/
font-size: 1.2em;
}
ul.display li .content_block a img{ /*–Double border technique–*/
padding: 5px;
border: 2px solid #ccc;
background: #fff;
margin: 0 15px 0 0;
float: left;
}
Step2. Styling the Content
Inside of each list item, we nest a div which will act as our
container of the content inside. I feel it’s easier to calculate the
columns when you don’t have to consider the margin and padding within.
This comes in handy especially when you are working with a liquid layout
(since we know % and fixed pixels don’t mix in too well).
HTML
CSS
color: #e7ff61;
text-decoration: none;
}
ul.display li .content_block {
padding: 0 10px;
}
ul.display li .content_block h2 {
margin: 0;
padding: 5px;
font-weight: normal;
font-size: 1.7em;
}
ul.display li .content_block p {
margin: 0;
padding: 5px 5px 5px 245px; <span style=“color: #777;”>/*–The left padding keeps the
content from flowing under the image–*/</span>
font-size: 1.2em;
}
ul.display li .content_block a img{ <span style=“color: #777;”>/*–Double border technique–*/</span>
padding: 5px;
border: 2px solid #ccc;
background: #fff;
margin: 0 15px 0 0;
float: left;
}
Step3. Creating the Secondary View Option
Now its time to style the second display option which are in columns flowing horizontally.

CSS
ul.thumb_view li{ width: 250px; } <span style=“color: #777;”>/*–Switch the width
to accommodate for the three column layout–*/</span>
ul.thumb_view li h2 { display: inline; }
ul.thumb_view li p{ display: none; }
ul.thumb_view li .content_block a img { margin: 0 0 10px; }
Step4. Creating the Switch
Time to wrap up this tutorial by creating the switch.

HTML
CSS
Using the ‘CSS Sprites’ technique, I create the link button.
width: 122px;
height: 26px;
line-height: 26px;
padding: 0;
margin: 10px 0;
display: block;
background: url(switch.gif) no-repeat;
outline: none;
text-indent: -9999px;
}
a.swap { background-position: left bottom; }
I didn’t feel like creating a hover state on the image, so I’ll just use the opacity to dim it down a tad bit once hovered over.
filter:alpha(opacity=75);
opacity:.75;
-ms-filter: “progid:DXImageTransform.Microsoft.Alpha(Opacity=75)”;
}
jQuery
At last, we’ll activate the switch with a little bit of jQuery.
$(document).ready(function(){
$(“a.switch_thumb”).toggle(function(){
$(this).addClass(“swap”);
$(“ul.display”).fadeOut(“fast”, function() {
$(this).fadeIn(“fast”).addClass(“thumb_view”);
});
}, function () {
$(this).removeClass(“swap”);
$(“ul.display”).fadeOut(“fast”, function() {
$(this).fadeIn(“fast”).removeClass(“thumb_view”);
});
});
});
</script>
Final View
Now Go and Experiment!
This method can be applied to many scenarios, so I would like to
encourage you to experiment with this technique. If you have any other
tricks to add on, please feel free to drop your comments!
best free download wordpress themes:
- jquery sample
- jquery mobile flip switch width
- css3 switcher
- jquery mobile toggle switch width
- example picture gallery html
- jquery mobile switch width
- drupal fast gallery tutorial
- iphone switch css3
- jquery list with image
- easy CSS switcher
- html gallery photo vertical
- display switch css
- display switch css jquery
- layout color change jquery free download
- flip toggle switch size jquery
- drupal css switcher
- jquery Display Switch Sample
- jquery mobile listview change color
- android switch css
- jquery fonts witcher
- jquery list
- css ordered list
- css sample
- jquery flip toggle switch
- iphone like switcher jquery
- jquery mobile margin css
- jquery switch table view
- jquery switch page
- jquery mobile css border list-view not working
- jquery plugin mobile toggle switch
- jquery switch mobile
- jquery style sheets switcher for ipad and iphone
- jquery mobile css display none
- jquery mobile css display: none
- jquery mobile switch size
- jquery mobile iphone like toggle switch
- jquery mobile flip toggle switches tutorial
- jquery mobile display none
- jquery mobile css replace page background
- jquery page switcher mobile
- jquery switch to mobile view
- jquery switch view
- jquery switch view flip
- switch button jquery iphone
- switch ccs rating jquery
- switch css3
- switch jquery iphone
- switch layout jquery css wordpress
- switch table layout with css and jquery
- switch view in jquery
- toggle switch css
- toggle switch html css
- using jquery to design layouts on android
- view switch jquery
- wordpress jquery display switch
- swap jquery mobile
- swap cell jquery
- jquery switch view style
- jquery switcher css3
- jquery toggle change with screen width
- jquerymobile iphone css
- jquery touch toggle switch on off
- jquery tutorial display switch table list
- jquery переключатель iphone
- jquerymobile flip switch margin
- liquid layout querymobile
- mobile css switcher
- opacity like iphone in jquery
- styling toggle switch jquery mobile
- переключатель как iphone jquery
- change all fonts table jquery
- css3 iphone switch
- css3 on off
- css3 swicther
- css3 switch
- display switch css and jquery
- display switch jquery
- display switch with css and jquery
- css переключатель ios
- flip switch css
- flip toggle switch iphone like jquery mobile
- css3 flip switch ios or iphone
- css3 -webkit display for andriod
- css template jquery switch
- css display switch list view jquery
- css flip toggle switch jquery
- css iphone-like switch
- css jquery switch layout
- css like android jquery
- css switch list
- css switcher css3
- css switcher joomla
- css switcher jquery
- css switcher wordpress 2011
- flip toggle switch jquery examples
- how to change the font size using listview in jquery mobile
- how to create flip toggle switch in ipad
- jquery css display iphone
- jquery css switcher mobile
- jquery flip padding issue





You made some decent points there. I did a search on the subject and found most guys will go along with with your blog.