• Home
  • Documentations
    • Phlox WordPress Theme
    • Phlox Pro WordPress Theme
    • Master Slider jQuery
    • Master Slider WordPress Pro
    • Master Slider WordPress Free
    • LOTUS WordPress Theme
  • Video Tutorials
    • Phlox ? Video Tutorials
    • Master Slider WP Pro
    • Master Slider WP Free
    • Master Slider jQuery
    • Lotus ? Video Tutorials
  • FAQ
    • General Questions
    • LOTUS WordPress Theme
    • Master Slider jQuery
    • Master Slider WordPress
    • CUTE Slider
  • Knowledge base
    • Beginners
    • Advanced Techniques
    • WordPress plugins
  • Support Forum
    • Login Or Register
    • Support Forum
    • Support Policy
Averta Support Center
  • Home
  • Documentations
    • Phlox WordPress Theme
    • Phlox Pro WordPress Theme
    • Master Slider jQuery
    • Master Slider WordPress Pro
    • Master Slider WordPress Free
    • LOTUS WordPress Theme
  • Video Tutorials
    • Phlox ? Video Tutorials
    • Master Slider WP Pro
    • Master Slider WP Free
    • Master Slider jQuery
    • Lotus ? Video Tutorials
  • FAQ
    • General Questions
    • LOTUS WordPress Theme
    • Master Slider jQuery
    • Master Slider WordPress
    • CUTE Slider
  • Knowledge base
    • Beginners
    • Advanced Techniques
    • WordPress plugins
  • Support Forum
    • Login Or Register
    • Support Forum
    • Support Policy

Looking for the answer

  • Home
  • Available Colors in Phlox
  • Styling Layers

Styling Layers


Here you can find out how to add custom style to a layer and set different margin and padding sizes depend on the active breakpoint.

Adding custom styles

You can add a style or class name to the layer element like any other html element. In addition, as Master Slider moves each layer inside a container named frame, sometimes you need to add style or class name to the frame element not the layer element directly. To add class name, you can use data-frame-class, for style data-frame-style and for id data-frame-id attributes. The example below defines class name and style for the layer frame element.

    <div id="masterslider" class="master-slider">
      <div class="ms-slide">
        <!-- .... -->
        <div class="ms-layer" 
             data-type="text" 
             data-frame-class="custom-text-layer" 
             data-frame-style="background:red;"
        >
          Text layer content here...
        </div>
        <!-- .... -->
      </div>
      <!-- .... -->
    </div>

Adding padding and margin

Layers can get different padding and margin values depend on the active breakpoint in the slider. To define it, you can use data-paddingset and data-marginset attributes. Margin or padding value for each breakpoint should be separated by comma and the order of the values should be the same as the breakpoints from large to small. The following example adds margin and padding to a text layer.

    <div id="masterslider" class="master-slider">
      <div class="ms-slide">
        <!-- .... -->
        <div class="ms-layer" 
             data-type="text"
             data-marginset="30px, 10px 40px, 10px"
             data-paddingset="10px 15px, 10px 15px 0 30px, 0"
        >
          Text layer content here...
        </div>
        <!-- .... -->
      </div>
      <!-- .... -->
    </div>

Was this information helpful?

Submit
Wizard Home
Related articles list
Create New Support Ticket
Copyright © 2017 Averta. All rights reserved.