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>
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>
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>
.webp)
Comments
Post a Comment