Welcome to W3Courses
 Like Us on Facebook

Tech

How to Format CCK Textboxes Exposed by Views Filter in Drupal

To change the size of the text boxes exposed by Views Filter, icnclude the following code in your style.css file of your current theme:

#edit-fieldname1
{
    width: 175px;
    height: 44px;
}

#edit-fieldname2
{
    width: 175px;
}

Change the fieldname1 and fieldname2 to the name of your fields.

Share

How to format the display of Node Images module in Drupal

When you include node images, they appear somewhere on your node page. To right align the images and set a certain width of images, include the following code to style.css file of your current theme

.node_images
{
    float: right;
    margin-right: 0px;
    width: 450px;
}

Share

How to Format CCK Field Display in Drupal

When you create CCK fields, they appear on your web page but not formatted the way you want. To control the formatting, include the following code in the style.css file of your current theme.

.field
{
    margin-top: 10px;
    display: table;
}

.field-label
{
    float: left;
    width: 120px;
}

.field-items
{
    float: left;
}

Share

Best Web Safe Fonts to Choose for your Website

The fonts that are most safe to use are:

  1. Arial / Helvetica
  2. Times New Roman / Times
  3. Courier New / Courier

The fonts that are most safe to use on Windows are:

  1. Book Antiqua
  2. Tahoma
  3. Lucida Sans
  4. Lucida Console

The fonts that are most safe to use on Mac are:

  1. Geneva
  2. Lucida
  3. Monaco

Fonts that work on Windows and MacOS but not Unix+X are:

Share

How to Format Proximity Fields Exposed by Views Filter in Drupal

To format Proximity fields, add the following code to your style.css file of your current theme. If the change does not take affect, go to your view display page, view source and check the css classes and change the class names in the code below to match the names of your classes.

Share

How to Remove Breadcrumbs from your Drupal Theme

To remove breadcrumbs from your Drupal web site you’ll need to remove a few lines of code from the page.tpl.php file that came with the theme. The location of the breadcrumbs varies depending on the theme; the lines of code to remove from page.php.tpl are as follows:

<?php if ($breadcrumb): ?>
<div id=”breadcrumb”>
  <?php print $breadcrumb; ?>
</div>
<?php endif; ?>

Share

View Line Numbers in Context Editor

To view lines numbers on the left side fo your code, open Context Editor:

  1. Click Options.
  2. Click Environment Options.
  3. Click the Edior Tab.
  4. Check Line Numbers checkbox.

Share

How to Add Background Color using CSS

To add a background color, add the following to your CSS class and set the desired color

    background-color: #ffffff;

Share

How to Add a Background Image using CSS

To add a background image, add the following to your CSS class and set the path and imagename to your image

    background-image: url('path/imagename.png');

Share

CSS Background Image and Background Color Opacity or Transparency

Add the following code to any of your CSS classes to set the background opacity and transparency

    /* For IE */
    filter: alpha(opacity=60);

    /* For Firefox and Netscape */
    -moz-opacity: 0.6;

    /* CSS Standard */
    opacity: 0.6;


or add a certain image background to make it transparent, add the following code

    background-image: url('path/imagename.png');

Share