Force the DIVI secondary to not merge with the mobile menu and remain even on mobile

You can force the menu items to remain visible in the secondary header on mobiles using this CSS:

@media screen and (max-width: 980px) {

#page-container {

padding-top: 0px !important;

}

#top-header {

position: static !important;

display: block !important;

}

#top-header .container {

padding-top: 0.75em !important;

}

#page-container #main-header {

position: relative !important;

top: 0 !important;

}

#top-header #et-secondary-menu,

#top-header #et-secondary-nav {

display: block !important;

}

#top-header #et-secondary-nav li {

text-align: center !important;

}

#et-main-area {

padding-top: 1px;

}

}

CSS tricks to add some creativity and flair to your website

Here are a few fun CSS tricks that you can use to add some creativity and flair to your website or web application:

Text Shadow: You can add a shadow to text by using the text-shadow property. For example:

h1 {

  text-shadow: 2px 2px #ff0000;

}

This will create a red shadow 2 pixels to the right and 2 pixels down from the text.

Gradient Background: You can create a gradient background using CSS by setting the background-image property to a linear or radial gradient. For example:

body {

  background-image: linear-gradient(to bottom, #ff0000, #0000ff);

}

This will create a gradient that goes from red to blue from top to bottom.

Animations: CSS animations allow you to add movement and interactivity to your website. You can use the @keyframes rule to define an animation and then apply it to an element with the animation property. For example:

@keyframes example {

  from {

    transform: translateX(0);

  }

  to {

    transform: translateX(100px);

  }

}

.element {

  animation: example 2s linear;

}

This will make the .element move horizontally 100 pixels to the right over the course of 2 seconds using a linear easing.

Transform: The transform property allows you to scale, rotate, and translate elements. For example:

.element {

  transform: rotate(45deg);

}

This will rotate the .element 45 degrees clockwise.

These are just a few of the many creative things you can do with CSS. I encourage you to explore more and see what kind of effects you can create!

Posted in

Handy CSS hacks for Gravity Forms

Gravity Forms is a popular plugin for WordPress that allows you to create custom forms for your website. The plugin includes a wide range of styling options, but you can also use CSS to further customize the appearance of your forms. Here are some handy CSS hacks you can use to customize your Gravity Forms:

  1. Change the font: You can change the font of your forms by adding the following code to your site's CSS: "font-family: 'your font name';"
  2. Change the form color: You can change the color of your form by adding the following code to your site's CSS: "background-color: #hexcode;"
  3. Change the button color: You can change the color of your submit button by adding the following code to your site's CSS: "input[type='submit'] {background-color: #hexcode;}"
  4. Center the form: You can center your form on the page by adding the following code to your site's CSS: "form.gform_wrapper {margin: 0 auto;}"
  5. Change the input field width: You can change the width of your input fields by adding the following code to your site's CSS: "input[type='text'] {width: pixels;}"
  6. Add a border to the form: You can add a border to your form by adding the following code to your site's CSS: "form.gform_wrapper {border: 1px solid #hexcode;}"
  7. Add a hover effect: You can add a hover effect, such as changing the color of a button when someone hovers over it, by adding the following code to your site's CSS: "input[type='submit']:hover {background-color: #hexcode;}"
  8. Style radio and checkboxes: You can customize the appearance of radio and checkboxes in your form by adding the following code to your site's CSS: "input[type='radio'], input[type='checkbox'] {property: value;} "
It's important to note that to add custom CSS to your Gravity Forms, you will need to access your WordPress site's CSS editor and add the code to the appropriate area. Additionally, Gravity forms allow for custom styling for specific forms via the settings. It's also recommended to back up your website before making any changes to the site's code, in case something goes wrong. It's also a good idea to have a general understanding of CSS and its syntax before making any major changes, as it can make debugging and troubleshooting easier.

8 Handy CSS hacks for Weebly

Weebly is a website builder that allows users to create their own websites without needing to know how to code. While it does offer a wide range of design options, there may be times when you want to add custom CSS (Cascading Style Sheets) to your site to further customize its appearance. Here are some handy CSS hacks that you can use with Weebly:

  1. Change the font of your text: You can change the font of your text by adding the following code to your site's CSS: "font-family: 'your font name';"
  2. Change the color of your text: You can change the color of your text by adding the following code to your site's CSS: "color: #hexcode;"
  3. Change the background color of your site: You can change the background color of your site by adding the following code to your site's CSS: "background-color: #hexcode;"
  4. Add a background image to your site: You can add a background image to your site by adding the following code to your site's CSS: "background-image: url('imageurl');"
  5. Change the size of an element: You can change the size of an element, such as a header or image, by adding the following code to your site's CSS: "width: pixels; height: pixels;"
  6. Center an element: You can center an element, such as a header or image, by adding the following code to your site's CSS: "text-align: center;"
  7. Remove the Weebly footer: You can remove the Weebly footer by adding the following code to your site's CSS: "#footer-wrap {display: none;}"
  8. Add a hover effect: You can add a hover effect, such as changing the color of a button when someone hovers over it, by adding the following code to your site's CSS: "selector:hover {property: value;}"

It's important to note that to add custom CSS to your Weebly site, you will need to access the site's HTML/CSS editor and add the code to the appropriate area.

It's also recommended to back up your website before making any changes to the site's code, in case something goes wrong.

It's also important to test your changes on different devices and browsers to ensure compatibility.

It's also a good idea to have a general understanding of CSS and its syntax before making any major changes, as it can make debugging and troubleshooting easier.

Create an advertisement with CSS and HTML

 Here's an example of a CSS style that you could use for an HTML advertisement:

.advertisement {

    background-color: #f2f2f2; /* Light gray background color */

    border: 1px solid #cccccc; /* Light gray border */

    padding: 20px; /* Padding around the content */

    text-align: center; /* Center align the text */

    max-width: 300px; /* Limit the width of the ad */

    margin: 0 auto; /* Center the ad on the page */

}


.advertisement img {

    width: 100%; /* Make the image fill the entire width of the ad */

}


.advertisement h2 {

    font-size: 24px; /* Large heading text */

    margin-bottom: 10px; /* Add some margin under the heading */

    color: #333; /* Dark gray heading color */

    text-transform: uppercase; /* Uppercase the heading text */

    letter-spacing: 2px; /* Add some space between letters */

}


.advertisement p {

    font-size: 18px; /* Medium-sized text */

    color: #555; /* Gray text color */

    line-height: 1.5; /* Add some space between lines */

    margin-bottom: 20px; /* Add some margin under the text */

}


.advertisement .button {

    background-color: #4CAF50; /* Green background color for the button */

    color: white; /* White text color for the button */

    padding: 12px 20px; /* Padding around the button */

    border: none; /* Remove the border */

    text-decoration: none; /* Remove the underline from the link */

    cursor: pointer; /* Change the cursor to a hand when hovering */

    margin-top: 20px; /* Add some margin above the button */

}

You can apply this CSS to an HTML structure like this one:

<div class="advertisement">

    <img src="your-image.jpg" alt="Ad image">

    <h2>Your Product</h2>

    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. </p>

    <a href="#" class="button">Learn More</a>

</div>

This will create an advertisement block with a light gray background and a border, with an image on top, a heading, and a paragraph of text below it and a button at the end. The CSS code gives a specific design for the elements inside, like the text size, color, and spacing. Remember that you can always adjust this code to match your preferences and the design of your advertisement.

Posted in

Code Highlight CSS Style

 Here is a CSS style that you can use to highlight code:



pre {

  background-color: #f5f5f5;

  border: 1px solid #ccc;

  border-radius: 4px;

  font-family: monospace;

  font-size: 12px;

  line-height: 1.5;

  overflow: auto;

  padding: 10px;

}


pre code {

  background-color: transparent;

  border-radius: 0;

  color: #333;

  display: block;

  padding: 0;

}


This CSS style adds a background color, border, and padding to the pre element, which is used to display preformatted text. It also adds a color to the code inside the pre element. This will highlight the code and make it easier to read.


You can customize this style to suit your needs by changing the colors, font, and other properties. For example, you can add syntax highlighting by styling different types of code elements (e.g. keywords, strings, comments) with different colors.