Skip to main content

Avoid large layout shifts solved(CLS)

 


Avoid large layout shifts 2 elements found







ye problem humko is liye aati hai kyoki  jab user site ko open karta ahi to site ka layout shift hota hai iss liye layout ka place asign karna hota hai taki layout apni jagha per stick ho jaye 

paste this code in html/java script in layout or u can paste it in the theme 


HTML
<!DOCTYPE html>
<html>
<head>
  <title>Blog Layout</title>
  <style>
    /* CSS inline style */
    .container {
      width: 80%;
      margin: 0 auto;
      background-color: #f2f2f2;
      padding: 20px;
      box-sizing: border-box;
    }

    .featured-post {
      width: 70%;
      background-color: #ddd;
      padding: 10px;
      box-sizing: border-box;
    }

    .blog-post {
      width: 60%;
      background-color: #ddd;
      padding: 10px;
      box-sizing: border-box;
    }

    .sidebar {
      width: 30%;
      background-color: #ddd;
      padding: 10px;
      box-sizing: border-box;
    }

    .footer {
      width: 100%;
      background-color: #f2f2f2;
      padding: 20px;
      box-sizing: border-box;
    }

    /* Additional classes for specified elements */
    .blog-widget {
      /* Define styles for the .widget.Blog element */
      /* For example */
      background-color: #f5f5f5;
      padding: 15px;
      margin-bottom: 15px;
    }

    .big-post-text {
      /* Define styles for the .big-post-text element */
      /* For example */
      font-size: 20px;
      font-weight: bold;
      color: #333;
      margin-top: 20px;
    }

    .post-header {
      /* Define styles for the .post-header element */
      /* For example */
      font-size: 18px;
      font-weight: bold;
      color: #666;
      margin-bottom: 10px;
    }

    .post-link {
      /* Define styles for the .post-link element */
      /* For example */
      text-decoration: none;
      color: #0077cc;
    }
  </style>
</head>
<body>
  <header class="header">
    <!-- Header content here -->
  </header>

  <div class="container">
    <main class="main-content">
      <section class="featured-post blog-widget" id="Blog1" data-version="2">
        <!-- Featured Post content here -->
      </section>

      <section class="blog-post big-post-text">
        <div class="big-post-text">
          <!-- Big Post Text content here -->
          <div class="post-header">
            <!-- Post Header content here -->
            <a href="https://insightssolver.blogspot.com/" class="post-link">Link</a>
          </div>
        </div>
      </section>

      <aside class="sidebar">
        <!-- Sidebar content here -->
      </aside>
    </main>
  </div>

  <footer class="footer">
    <!-- Footer content here -->
  </footer>
</body>
</html>
solved
https://www.youtube.com/watch?v=_-3lzdN4PVQ TAKE REFRENCE TO UNDERSTAND
if upper code is not fully working u can try this 2nd code



HTML2
<!DOCTYPE html>
<html>
<head>
  <title>Blog Layout</title>
  <style>
    /* CSS inline style */
    .container {
      width: 80%;      width: 80%;
      margin: 0 auto;
      background-color: #f2f2f2;
      padding: 20px;20px;
      box-sizing: border-box;
    }

    .featured-post {
          width: 80%;      width: 80%;
      background-color: #ddd;
      padding: 10px;10px;
      box-sizing: border-box;
    }

    .blog-post {
      width: 60%;width: 60%;
      background-color: #ddd;
      padding: 10px;10px;
      box-sizing: border-box;
    }

    .sidebar {
      width: 30%; width: 30%;
      background-color: #ddd;
      padding: 10px;10px;
      box-sizing: border-box;
    }

    .footer {
      width: 100%;width: 100%;
      background-color: #f2f2f2;
      padding: 20px;20px;
      box-sizing: border-box;
    }

    /* Additional classes for specified elements */
    .blog-widget {
      /* Define styles for the .widget.Blog element */
      /* For example */
      background-color: #f5f5f5;
      padding: 15px;15px;
      margin-bottom: 15px;15px;
    }

    .big-post-text {
      /* Define styles for the .big-post-text element */
      /* For example */
      font-size: 20px;20px;
      font-weight: bold;
      color: #333;
      margin-top: 20px;20px;
    }

    .post-header {
      /* Define styles for the .post-header element */
      /* For example */
      font-size: 18px;18px;
      font-weight: bold;
      color: #666;
      margin-bottom: 10px;10px;
    }

    .post-link {
      /* Define styles for the .post-link element */
      /* For example */
      text-decoration: none;
      color: #0077cc;
    }
  </style>
</head>
<body>
  <header class="header">
    <!-- Header content here -->
  </header>

  <div class="container">
    <main class="main-content">
      <section class="featured-post blog-widget" id="Blog1" data-version="2">
        <!-- Featured Post content here -->
      </section>

      <section class="blog-post big-post-text">
        <div class="big-post-text">
          <!-- Big Post Text content here -->
          <div class="post-header">
            <!-- Post Header content here -->
            <a href="https://insightssolver.blogspot.com/" class="post-link">Link</a>
          </div>
        </div>
      </section>

      <aside class="sidebar">
        <!-- Sidebar content here -->
      </aside>
    </main>
  </div>

  <footer class="footer">
    <!-- Footer content here -->
  </footer>
</body>
</html>
here i am posting best one more code related to upper problem in this lil bit unused java script no will also reduce


HTML3


<!DOCTYPE html>
<html>
<head>
  <title>Blog Layout</title>
  <style>
    /* CSS inline style */
    .container {
      width: 80%;
      margin: 0 auto;
      background-color: #f2f2f2;
      padding: 20px;
      box-sizing: border-box;
    }

    .featured-post, .blog-post, .sidebar {
      width: 100%;
      background-color: #ddd;
      padding: 10px;
      box-sizing: border-box;
    }

    .blog-post {
      width: 60%;
    }

    .sidebar {
      width: 30%;
    }

    .footer {
      width: 100%;
      background-color: #f2f2f2;
      padding: 20px;
      box-sizing: border-box;
    }

    /* Additional classes for specified elements */
    .blog-widget {
      background-color: #f5f5f5;
      padding: 15px;
      margin-bottom: 15px;
    }

    .big-post-text {
      font-size: 20px;
      font-weight: bold;
      color: #333;
      margin-top: 20px;
    }

    .post-header {
      font-size: 18px;
      font-weight: bold;
      color: #666;
      margin-bottom: 10px;
    }

    .post-link {
      text-decoration: none;
      color: #0077cc;
    }
  </style>
</head>
<body>
  <header class="header">
    <!-- Header content here -->
  </header>

  <div class="container">
    <main class="main-content">
      <section class="featured-post blog-widget" id="Blog1" data-version="2">
        <!-- Featured Post content here -->
      </section>

      <section class="blog-post big-post-text">
        <div class="big-post-text">
          <!-- Big Post Text content here -->
          <div class="post-header">
            <!-- Post Header content here -->
            <a href="https://insightssolver.blogspot.com/" class="post-link">Link</a>
          </div>
        </div>
      </section>

      <aside class="sidebar">
        <!-- Sidebar content here -->
      </aside>
    </main>
  </div>

  <footer class="footer">

    <!-- Footer content here -->
  </footer>
</body>
</html>

Comments

Popular posts from this blog

ai tool

 https://smodin.io/free-english-rewriter-and-spinner/ai-detection-remover ai detecter and removal https://originality.ai/blog/highlight-ai-text= for ai highlighter and affiliate marketing https://gptzero.me/  = ai writing detector and highlighter  https://www.zerogpt.com/           = ai content writer detector https://plagiarism-remover.com/humanize-ai-text/           = humanize writer

Add Code Box

  HTML CSS And Java Script  <style> .K2_CBox{position:relative;background:#fff;width:100%;border-radius:6px;box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;padding:10px;margin:30px 0 30px} .K2_CBox .CB_Heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px} .K2_CBox .CB_Heading span{margin:0;font-weight:700;font-family:inherit;font-size:1.1rem} .K2_CBox .C_box_main{cursor:pointer;display:inline-flex;align-items:center;padding:12px;outline:0;border:0;border-radius:50%;background:#004cbd;transition:all .3s ease;-webkit-transition:all .3s ease}.K2_CBox .C_box_main:hover{opacity:.8}.K2_CBox .C_box_main .CBox_icn{flex-shrink:0;display:inline-block;width:18px;height:18px;background-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23fefefe' stroke-linecap='round' stroke-linejoin='round' stroke-wi...

create a list of 100 things someone may now know about SEO

  create a list of 100 things someone may now know abouT SEO stands for Search Engine Optimization. SEO is the process of optimizing a website to improve its visibility and ranking on search engines. Google is the most popular search engine, followed by Bing and Yahoo. SEO involves both on-page and off-page optimization techniques. On-page optimization includes optimizing the content and structure of a website. Off-page optimization includes building backlinks to a website. SEO requires constant monitoring and updating to maintain rankings. Keyword research is the foundation of SEO. Long-tail keywords are easier to rank for than short-tail keywords. Keyword stuffing is a black hat SEO technique that can get a website penalized. Meta tags are important for on-page optimization. Title tags and meta descriptions should be unique and relevant to the page. Header tags (H1, H2, H3) are important for on-page optimization. Content should be well-written and provide value to the reader. Dup...