Showing posts with label CSS. Show all posts
Showing posts with label CSS. Show all posts

Friday, July 12, 2024

CSS Counter Sets

 <!DOCTYPE html>

<html>

<head>

<style>

ol {

  counter-reset: section;

  list-style-type: none;

}


li::before {

  counter-increment: section;

  content: counters(section,".") " ";

}

</style>

</head>

<body>


<ol>

  <li>item</li>

  <li>item   

  <ol>

    <li>item</li>

    <li>item</li>

    <li>item

    <ol>

      <li>item</li>

      <li>item</li>

      <li>item</li>

    </ol>

    </li>

    <li>item</li>

  </ol>

  </li>

  <li>item</li>

  <li>item</li>

</ol>


<ol>

  <li>item</li>

  <li>item</li>

</ol>


</body>

</html>



====================Output========================









Tuesday, July 2, 2024

Easy Accordion with Plus/Minus Icons

 <!doctype HTML>

<html>

<head>

<meta content="text/html; charset=UTF-8" />

<title>Web Code Addict Accordion</title>

</head>

<body>

<div class="accordion_container">

    <div class="accordion_heading">First Accordian Head<span class="plusminus">+</span>


    </div>

    <div class="accordion_content" style="display: none;">

        <p>First Accordian Body, it will have description</p>

    </div>

    <div class="accordion_heading">Second Accordian Head<span class="plusminus">+</span>


    </div>

    <div class="accordion_content" style="display: none;">

        <p>Second Accordian Body, it will have description</p>

    </div>

    <div class="accordion_heading">Third Accordian Head<span class="plusminus">+</span>


    </div>

    <div class="accordion_content" style="display: none;">

        <p>Third Accordian Body, it will have description</p>

    </div>

</div>

</body>

</html>


/////////////////////////////////CSS///////////////////////////////////////////////////

.accordion_container {

    width: 500px;

}

.accordion_heading {

    background-color:skyblue;

    color: white;

    cursor: pointer;

    font-family: arial;

    font-size: 14px;

    margin: 0 0 1px 0;

    padding: 7px 11px;

    font-weight: bold;

}

.accordion_content {

    background: lightgray;

}

.accordion_content p {

    padding: 18px 5px;

    margin: 0px;

}

.plusminus {

    float:right;

}

/////////////////////////////////////////////Script/////////////////////////////

$(document).ready(function () {

  $(".accordion_heading").click(function () {

        if ($('.accordion_content').is(':visible')) {

            $(".accordion_content").slideUp(300);

            $(".plusminus").text('+');

        }

        if ($(this).next(".accordion_content").is(':visible')) {

            $(this).next(".accordion_content").slideUp(300);

            $(this).children(".plusminus").text('+');

        } else {

            $(this).next(".accordion_content").slideDown(300);

            $(this).children(".plusminus").text('-');

        }

    });

});

Thursday, March 30, 2023

Gradient Border Button CSS





<button>Gradient Border Button </button>

<style>
button {
  color: #000;
  cursor:pointer;
  font-size: 1rem;
  padding: .6rem 4rem;
  border-radius: 100rem;
  border: solid 3px transparent;
  background-origin: border-box;
  background-clip: content-box, border-box;
  box-shadow: 0 0 6px 0 rgba(157, 96, 212, 0.5);
  box-shadow: 2px 1000px 1px #fff inset;
  background-image: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0)), linear-gradient(101deg, #78e4ff, #ff48fa);
}

button:hover {
  color: #fff;
  box-shadow: none;
}
</style>

Monday, March 27, 2023

Enqueue Style and Scripts in Wordpress function file

In WordPress, instead of simply adding these to the header, you should use a method called enqueueing which is a standardized way of handling your assets with the added bonus of managing dependencies. Find out how to do it below using wp_enqueue_scripts.


<?php


add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );

function theme_enqueue_styles() {

    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );

    wp_enqueue_style( 'owl-style', get_stylesheet_directory_uri() . '/assets/css/owl.carousel.min.css');

    wp_enqueue_style( 'owl-default-style', get_stylesheet_directory_uri() . '/assets/css/owl.theme.default.min.css');

  //wp_enqueue_script( 'owl-carousel', get_stylesheet_directory_uri() . '/assets/js/owl.carousel.min.js', array(), '1.0.0', true);

}

To load scripts in footer use wp_footer.

function add_this_script_footer() {

wp_enqueue_script( 'owl.carousel-js', get_stylesheet_directory_uri() . '/assets/js/owl.carousel.min.js');

wp_enqueue_script( 'scripts_js', get_stylesheet_directory_uri() . '/assets/js/scripts.js');

}

add_action('wp_footer', 'add_this_script_footer'); 

Friday, March 24, 2023

Best website hosting servers



There are many website hosting servers available, and the "best" one depends on your specific needs and requirements. However, here are some popular website hosting servers that are known for their reliability and performance:

  1. Bluehost: This hosting server is popular among bloggers, small businesses, and WordPress users. It offers easy-to-use control panels, reliable uptime, and excellent customer support. https://www.bluehost.com/

  2. HostGator: HostGator is a popular hosting server for small businesses, offering flexible plans, unlimited bandwidth, and 24/7 customer support. https://hotstar.com/

  3. SiteGround: SiteGround is known for its fast loading speeds, excellent customer support, and user-friendly interface. It's a popular choice for WordPress sites and e-commerce stores. https://world.siteground.com/

  4. A2 Hosting: A2 Hosting is a reliable hosting server with fast loading speeds, excellent uptime, and affordable pricing. It offers a variety of hosting plans, including shared, VPS, and dedicated hosting. https://www.a2hosting.com/

  5. DreamHost: DreamHost is a reliable and user-friendly hosting server with a wide range of features and tools. It offers unlimited bandwidth and storage, free SSL certificates, and easy WordPress installation. https://www.dreamhost.com/

It's important to research and compares different hosting servers before choosing one that best suits your needs. Consider factors such as pricing, uptime, customer support, and features offered.


For Professional website contact WEB CODE ADDICT

View this post on Instagram A post shared by WebCodeAddict (@webcodeaddicted)