Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 24. august 2016
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Dokumentácia  »  HTML  »  CSS classes policy

3.13. CSS classes policy

CSS classes policy in phpMyEdit is one from the most complicated and complex features. The goal is to reach almost any possible classification of HTML elements with the possibility to simplify classification to lower number of classes.

The phpMyEdit CSS class schema is displayed here:

Example 3-35. CSS class name schema

<prefix>-<element>-<page_type>-<position>-<divider>-<postfix>

Particular parts are described here:

  • The prefix part is straighforward. Every phpMyEdit CSS class has a user configurable prefix. It can be empty.

  • The element represents the name or type of element. The examples are form, row, value, input and others.

  • In order to distinguish between different types of pages there is a page_type. The possible values for this part are add, view, change, copy, delete. This part is empty for table listing and table filtering pages.

  • There are also some elements, which occur on the top and on the bottom of page as well. For this matter there is position part present with possible values up and down.

  • The divider aim is to provide difference between even and odd table listing rows. This part, if present, is always numeric with values starting from 0.

  • At the end of CSS class name is postfix. This part is related to a particular field. Every field can have its own postfix. See field's CSS customization for more information.

  • The default separator between parts is dash (-) and can be changed if desired.

CSS class names configuration is handled via $opts['css'] associative array. Here are possible configuration options related to this issue.

$opts['css']['prefix']   prefix of every phpMyEdit CSS class (pme by default)
$opts['css']['page_type']   if page type should occur in class name (disabled by default)
$opts['css']['position']   if position on the page should occur in class name (disabled by default)
$opts['css']['divider']   how many list table rows should have their own number before starting counting again from 0 (by default 2; value of -1 means every row has its own number and value of 0 means disabled)
$opts['css']['separator']   separator between CSS class name parts (dash - by default)

For concrete names of CSS classes look into HTML source code of your generated page. In the following box are examples of how CSS class names may appear. However your CSS class names can differ according to your fields and configuration respectively.

Example 3-36. CSS class name examples

pme-navigation-up
pme-row-0
pme-cell-DateTime
pme-cancel-view
pme-input-change
pme-key-ArticleID


Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov