CSS3 Horizontal Accordion Slider

Similar documents
Last week we talked about creating your own tags: div tags and span tags. A div tag goes around other tags, e.g.,:

Essential HTML & CSS for WordPress. Mark Raymond Luminys, Inc mraymond@luminys.com

JJY s Joomla 1.5 Template Design Tutorial:

Web layout guidelines for daughter sites of Scotland s Environment

OPENTABLE GROUP SEARCH MODULE GETTING STARTED ADD RESERVATIONS TO YOUR WEBSITE

Introduction to Adobe Dreamweaver CC

ICE: HTML, CSS, and Validation

Joomla! template Blendvision v 1.0 Customization Manual

Web Design and Databases WD: Class 7: HTML and CSS Part 3

Web Design and Development ACS Chapter 9. Page Structure

RSW. Responsive Fullscreen WordPress Theme

BT CONTENT SHOWCASE. JOOMLA EXTENSION User guide Version 2.1. Copyright 2013 Bowthemes Inc.

Responsive Web Design for Teachers. Exercise: Building a Responsive Page with the Fluid Grid Layout Feature

Joomla! template JSN Mico Customization Manual

Chapter 1. Introduction to web development

Style & Layout in the web: CSS and Bootstrap

Further web design: Cascading Style Sheets Practical workbook

Garfield Public Schools Fine & Practical Arts Curriculum Web Design

CREATING HORIZONTAL NAVIGATION BAR USING ADOBE DREAMWEAVER CS5

Sizmek Formats. HTML5 Page Skin. Build Guide

Introduction to web development and JavaScript

Sizmek Features. Wallpaper. Build Guide

Outline of CSS: Cascading Style Sheets

CST 150 Web Design I CSS Review - In-Class Lab

Simply download Beepip from and run the file when it arrives at your computer.

We automatically generate the HTML for this as seen below. Provide the above components for the teaser.txt file.

Wykład 2_2 TINT. Kaskadowe arkusze stylu Tabele, zastosowanie znaczników div. Zofia Kruczkiewicz

Joomla! template JSN Boot Customization Manual

How to Add a Transparent Flash FLV movie to your Web Page Tutorial by R. Berdan Oct

{color:blue; font-size: 12px;}

Chapter 7 Page Layout Basics Key Concepts. Copyright 2013 Terry Ann Morris, Ed.D

Using HTML5 Pack for ADOBE ILLUSTRATOR CS5

Stylesheet or in-line CSS CSS attributes, used in stylesheets or in-line, can define:

Sizmek Formats. Collage. Build Guide

Web Design with CSS and CSS3. Dr. Jan Stelovsky

Positioning Container Elements

Contents. Downloading the Data Files Centering Page Elements... 6

Blueball Design Dynamic Content 2 Stack Readme Manual v1.0

HTML and CSS. Elliot Davies. April 10th,

TTIWResponsiveList - TTIWDBResponsiveList

Web Authoring CSS. Module Descriptor

HTML5 Standard Banner

Interactive Data Visualization for the Web Scott Murray

Using Style Sheets for Consistency

Responsive Web Design Creative License

A set-up guide and general information to help you get the most out of your new theme.

How to Create an HTML Page

Tableau Server Trusted Authentication

USM Web Content Management System

Cascading Style Sheet (CSS) Tutorial Using Notepad. Step by step instructions with full color screen shots

Development Perspective: DIV and CSS HTML layout. Web Design. Lesson 2. Development Perspective: DIV/CSS

ios App Development Using Cordova

2011 ithemes Media LLC. All rights reserved in all media. May be shared with copyright and credit left intact

Detailed Ad Specifications Rev. 20/03/2015 Babatunde Akinse

jquery Sliding Image Gallery

Kentico CMS, 2011 Kentico Software. Contents. Mobile Development using Kentico CMS 6 2 Exploring the Mobile Environment 1

Web Design Basics. Cindy Royal, Ph.D. Associate Professor Texas State University

Embedding a Data View dynamic report into an existing web-page

Differences between HTML and HTML 5

CHAPTER 10. When you complete this chapter, you will be able to:

Chapter 1 Introduction to web development and PHP

Web Developer Jr - Newbie Course

Creating Web Pages with HTML Simplified. 3rd Edition

What is CSS? Official W3C standard for controlling presentation Style sheets rely on underlying markup structure

CREATING A NEWSLETTER IN ADOBE DREAMWEAVER CS5 (step-by-step directions)

Online Advertising Specifications

WP Popup Magic User Guide

Sizmek Formats. IAB Mobile Pull. Build Guide

CSS 101. CSS CODE The code in a style sheet is made up of rules of the following types

GUIDE TO CODE KILLER RESPONSIVE S

css href title software blog domain HTML div style address img h2 tag maintainingwebpages browser technology login network multimedia font-family

Thanks. I want to thank everyone who helped and supported me in this project. Thank you all! Cédric KEIFLIN

spring semester course schedule

Introduction Designing your Common Template Designing your Shop Top Page Product Page Design Featured Products...

Web Building Blocks. Joseph Gilbert User Experience Web Developer University of Virginia Library

Study on Parallax Scrolling Web Page Conversion Module

CSS. CSS - cascading style sheets CSS - permite separar num documento HTML o conteúdo do estilo. ADI css 1/28

ITP 101 Project 3 - Dreamweaver

01/42. Lecture notes. html and css

Developer Tutorial Version 1. 0 February 2015

Phishing by data URI

WordPress and HTML Basics

How To Create A Web Page On A Windows (For Free) With A Notepad) On A Macintosh (For A Freebie) Or Macintosh Web Browser (For Cheap) On Your Computer Or Macbook (

MetService Online Advertising Technical Specifications

SAML Authentication Quick Start Guide

USER S MANUAL JOOMLA! GOVERNMENT WEB TEMPLATE

WEBSITE CONTENT MANAGEMENT SYSTEM USER MANUAL CMS Version 2.0 CMS Manual Version

css href title software blog domain HTML div style address img h2 tag maintainingwebpages browser technology login network multimedia font-family

Create Webpages using HTML and CSS

Citrix StoreFront. Customizing the Receiver for Web User Interface Citrix. All rights reserved.

ONLINE ADVERTISING SPECIFICATIONS

This document will describe how you can create your own, fully responsive. drag and drop template to use in the creator.

+ Create, and maintain your site

Transcription:

CSS3 Horizontal Accordion Slider DOCUMENTATION Webarti October 2, 2010

Table of Contents 1. Introduction.......3 1.1. Description and Features....3 2. Documentation...3 2.1. File Content.............3 2.2. HTML Structure...3 2.3. CSS Files and Structure.........5 2

1. Introduction 1.1 Description This beautiful and user-friendly accordion slider has been built using pure CSS and no JavaScript has been used. It can be used as a gallery (video or image), product tour, portfolio showcase, content slider etc. The item includes 3 ready to use themes and 2 accordion examples. The examples are a video gallery and a simple website. Features: Cross browser support, No JavaScript or images, Easy to customize, 3 Ready to use themes, 2 Accordion examples, JS-like smooth transition effects, Gradient backgrounds without images. 2. Documentation 2.1 File Content Files in the zip: There are two different directories in the zip file: CSS3 Accordion includes 3 ready to use themes. In theme directories, there are only index.html and theme.css Examples directory includes 2 usage examples of accordion slider. These are a Simple Website and a Video Gallery. 2.2 HTML Structure HTML structure of the accordion consists of only a simple unordered list. In each list item there are two elements. One of them is the title of accordion. The span tag is necessary for the text rotation and the URI fragment identifier (the # in the url) is used to know which item was 3

clicked. The identifier in the href parameter should target the id of its parent list item. The other element is the content div. The content can be anything like text, headings, lists, images, videos etc. The HTML structure of accordion is shown in Image 2.1. Image 2.1 HTML Structure of accordion slider Adding video (flash object) into the content div: This part is very important for the buyers who want to embed videos or use flash objects in accordion slider. As you know flash objects display on top of all layers regardless of z-index. This means that any video in the slider will always be on top of your other content and slider itself. However the solution is simple. Just add the following parameter inside the object tag of the video (or flash) that you want to embed. <param name="wmode" value="opaque" /> 4

If there is an embed tag, you also have to set wmode= opaque in the embed tag. Image 2.2 shows the final code. Image 2.2 Solution for the flash object z-index problem 2.3 CSS Files and Structure First of all, the CSS file of the accordion should be included in the head of your webpage. Be sure that the file path is set correctly. <link href="theme3.css" rel="stylesheet" type="text/css" /> There are three accordion themes in the main file. The construction of the CSS file of each theme is exactly same. These CSS files consist of three parts: Theme Styles, Theme Structure and necessary properties described as Do not change the following properties In Theme Styles part, there are only styling properties such as background-color, bordercolor, font-family etc. You can easly set these styles according to your websites design. Image 2.3 shows the styles of a theme. 5

Image 2.3 Theme Styles part of a CSS file The structure of accordion depends on the number of accordion pieces. Because of this, we need to calculate the necessary width and height of the accordion. The first thing to do is to decide the number of accordion pieces. Let s say our slider has 3 pieces. After that we need to set the width, and height (optional padding, border-width etc.) of elements such as title (<a> 6

tag) and content (<div> tag). These values depends on the structure of your website. See Image 2.4 for a sample CSS code. Image 2.4 Sample CSS code for the structure of accordion After setting these values, we need to calculate necessary accordion width and height. In our example, width of accordion is equal to 908px and the height is equal to 402px. See Image 2.5. Image 2.5 The result of calculation 7

Calculation of the accordion width: The width of accordion refers to the total width of visible components;.accordion>ul>li>div ( width + paddingright + paddingleft + marginright + borderrightwidth + borderleftwidth ) +.accordion>ul>li>a ( number of accordion pieces x ( width + marginrright ) ) width = ( 740px + 30px + 30px + 4px + 1px + 1px ) + ( 3 x ( 30px + 4px ) ) ---See Image 2.4 width = 908px ----------------------------------------------------------------------------------------------------------------- Calculation of the accordion height: The height of the accordion refers to the total height of visible area;.accordion>ul>li>div ( height + paddingtop + paddingbottom + bordertopwidth + borderbottomwidth ) width = 340px + 30px + 30px + 1px +1px --- See Image 2.4 width = 402px ----------------------------------------------------------------------------------------------------------------- Calculation of the list items magrin-right: Finally, we need to set the list items magrin-right property so that the slider works correctly. This value refers to the negative of total width of content div;.accordion>ul>li>div (width + padding-right + padding-left + marginright + borderrightwidth + borderleftwidth ) margin-right = 740px + 30px + 30px + 4px + 1px +1px --- See Image 2.4 margin-right = 806px and it s negative is -806px 8

Important Notes: The accordion is fired by :hover pseudo class in IE, because it does not support :target pseudo class Opera does not support gradient backgrounds. Transitions work in Chrome4+, Safari 4+, Opera 10.5+, Firefox 4+ and IE9+ Hope that you like it and feel free to contact us with any questions that might come up. http://codecanyon.net/user/webarti 9