Vertically centre and right align absolutely positioned child element in a flex container

Submitted by root on

.container_221 { display: flex; justify-content: center; align-items: center; position: relative; background: green; height: 100%; width: 100%; min-width: 250px; } .text_221 { position: absolute; background: red; padding: 12px; }

The referenced media source is missing and needs to be re-embedded.

 

webp

Creates a WebP copy of image style derivatives to decrease loading times.

Whenever an image style derivative is created this module will also create a WebP copy of the derivative to be served to supporting browsers.

301 Redirects for images (Rewrite)

An example is shown below.  This is within the .htaccess (htaccess) file.

  # To display the image that has been indexed on PINTREST
  # Redirecting old location to new location within Drupal
  # See: https://stackoverflow.com/questions/10871812/htaccess-image-redirection-for-specific-images-on-one-to-one-basis

  RewriteRule ^images/Island_Corian_Worktop_Iso_sm.jpg$ https://www.solidity.co.uk/sites/default/files/images/Island_Corian_Worktop_Iso_sm.jpg [L,R=301]

 

Change the class on the Submit Button on the Search Block Form

We can use the hook_form_alter() function.  You can place it within your theme.theme file or in your custom module.

/**
 * Implementation of hook_form_alter()
 * To: change the class on the submit button on the search_block_form from 'btn-primary' to 'btn-secondary'
 */

function {mythemename}_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'search_block_form') {
    $form['actions']['submit']['#attributes']['class'][] = 'btn-secondary';
  }
}

If you want to print out the variables you can as below or the Devel module.

Block Class

Block Class allows users to add classes to any block through the block's configuration interface. By adding a very short snippet of PHP to a theme's block.tpl.php file, classes can be added to the parent <div class="block ..."> element of a block. Hooray for more powerful block theming!