Soft Labs India

Code Hub: Just copy and paste

Skip to content

Remove traling slashes with Htaccess

March 4, 2025Htaccess Codesandeepdhand
 RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule (.+)/$ /$1 [R=301,L]
Leave a comment

Add dynmic custom menu in footer or any other page in wordpress

March 4, 2025Uncategorizedsandeepdhand
 <?php>  wp_nav_menu( array( 'menu' => 'menu-name') );  <?>

Leave a comment

Hide Long or Overflow Text in HTML

March 10, 2023Css Codessandeepdhand
.text-container {
  width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  padding: 10px;
  border: 1px solid #ccc;
}
Leave a comment

http To Https & redirect it to WWW simple Code

March 9, 2023Htaccess Codesandeepdhand
Options -MultiViews
RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} ^xyz.com$ [NC]
RewriteRule (.*) https://www.xyz.com/$1 [R=301,L] 

RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.xyz.com/$1 [R,L]
Leave a comment

Make Bootstrap Menu 100% Width

March 9, 2023Css Codessandeepdhand

Just copy and paste

.nav > li.dropdown.open {
    position: static;
}
.nav > li.dropdown.open .dropdown-menu {
    display:table; width: 100%; text-align: center; left:0; right:0;
}
.dropdown-menu>li {
    display: table-cell;
}
Leave a comment

Rotate a block in CSS

March 9, 2023Css Codessandeepdhand

Just copy and paste

.rotate {
animation: rotation 1s infinite linear;
}

@keyframes rotation {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
Leave a comment

Recent Posts

  • Remove traling slashes with Htaccess
  • Add dynmic custom menu in footer or any other page in wordpress
  • Hide Long or Overflow Text in HTML
  • http To Https & redirect it to WWW simple Code
  • Make Bootstrap Menu 100% Width

Recent Comments

No comments to show.

Archives

  • March 2025
  • March 2023

Categories

  • Css Codes
  • Htaccess Code
  • Uncategorized
Proudly powered by WordPress