. ok so <div class="col-md-offset-1 col-md-10 col-sm-12 wow fadeInUp"…
- User
. ok so Dobro došli Kao profesionalni fotograf specijaliziran za portretnu, svečanu i korporativnu fotografiju na području Zagreba i okolice, ovdje sam da vam pomognem zabilježiti važne trenutke na najljepši način. Sa strašću prema fotografiji i posvećenošću svakom detalju, cilj mi je osigurati da svaki trenutak postane trajna uspomena.
when using system zoom it gets broken do you know how to fix it in javascript
- Assistant
When a page layout becomes "broken" upon zooming in or out, it often indicates that the CSS or layout isn't responsive or adaptive. To address such issues using JavaScript, you can dynamically adjust the styling based on the window size or zoom level. Here's a basic approach to help solve layout issues:
- User
- Assistant
- User
// Function to detect browser zoom level function detectZoom() { var ratio = window.devicePixelRatio || 1; var zoom = Math.round(ratio * 100); return zoom; // Returns zoom percentage (100 = no zoom) }
// Function to detect if system font size has been increased function detectLargeFont() { var testDiv = document.createElement("div"); testDiv.style.fontSize = "16px"; testDiv.style.position = "absolute"; testDiv.style.visibility = "hidden"; document.body.appendChild(testDiv);
var computedFontSize = window.getComputedStyle(testDiv).fontSize; document.body.removeChild(testDiv);
// Compare with default font size if (parseInt(computedFontSize) > 16) { return true; // Font size has been increased } return false; }
// Adjust the font size of the .navbar-brand based on zoom or large font settings function adjustNavbarFontSize() { var navbarBrand = document.querySelector('.navbar-brand');
// Check for zoom level greater than 100% and large fonts if (detectZoom() > 100) { // If the user has zoomed in, reduce the font size navbarBrand.style.fontSize = '12px'; console.log("Zoom detected, adjusting font size."); } else if (detectLargeFont()) { // If the user has increased their system font size, reduce the font size navbarBrand.style.fontSize = '12px'; console.log("Large font size detected, adjusting font size."); } else { // If neither condition is met, use the default font size navbarBrand.style.fontSize = '21px'; console.log("Default settings detected, using default font size."); } }
- Assistant
- User
nothig happend
- Assistant
- User
maby jsut add when its OS zoom?
- Assistant
- User
ok so it feels like its not giving me the possiblitly to fully scrole up like it goes under the next div when OS zoomed and also above
<div class="col-md-offset-1 col-md-10 col-sm-12 wow fadeInUp" data-wow-delay="0.3s"> <h1 class="wow fadeInUp" >Dobro došli</h1> <p class="wow fadeInUp" >Kao profesionalni fotograf specijaliziran za portretnu, svečanu i korporativnu fotografiju na području Zagreba i okolice, ovdje sam da vam pomognem zabilježiti važne trenutke na najljepši način. Sa strašću prema fotografiji i posvećenošću svakom detalju, cilj mi je osigurati da svaki trenutak postane trajna uspomena. </p> </div> </div> - Assistant
- User
/--------------------------------------- Home Section
-----------------------------------------/#home { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; height: 100vh; text-align: center; overflow: hidden; }
#home h1 { color: #ffffff; border-radius: 4px; padding: 10%; position: relative; } #home p { color: #ffffff; border-radius: 4px; padding: 10%; position: relative; } #home .col-md-8 { padding-left: 62px; }
- Assistant
- User
no bad
- Assistant
- User
oko grate it does amazing for the bottom part of the div now for the top
- Assistant
- User
#home h1 { color: #ffffff; border-radius: 4px; padding: 10%; position: relative; } #home p { color: #ffffff; border-radius: 4px; padding: 10%; position: relative;
this NEEDS to stay
- Assistant
- User
expand the dive idn
- Assistant
- User
place fotografska oprema inside o fotografaiji
- Assistant
- User
full navbar
- Assistant
- User
why cant this work
- Assistant
- User
make it not disspare when clickd on .navbar-default .dropdown { position: sticky; }
/* Dropdown Button */ .dropbtn { background-color: transparent; color: #080808; font-size: 14px; font-weight: 300; letter-spacing: 1px; text-transform: uppercase; padding-right: 22px; padding-left: 22px; border: none; transition: all 0.4s ease-in-out; }
.dropbtn:hover { color: #000000; }
/* Dropdown Content */ .dropdown-content { display: none; position: absolute; background-color: #ffffff; min-width: 160px;
z-index: 10000; }
/* Links inside the dropdown */ .dropdown-content a { color: black; padding: 12px 16px; text-decoration: none; display: block; }
- Assistant
- User
when pressd on link the dropdown doset dissapere
- Assistant
- User
// Function to detect browser zoom level function detectZoom() { var ratio = window.devicePixelRatio || 1; var zoom = Math.round(ratio * 100); return zoom; // Returns zoom percentage (100 = no zoom) }
// Function to detect if system font size has been increased function detectLargeFont() { var testDiv = document.createElement("div"); testDiv.style.fontSize = "16px"; testDiv.style.position = "absolute"; testDiv.style.visibility = "hidden"; document.body.appendChild(testDiv);
var computedFontSize = window.getComputedStyle(testDiv).fontSize; document.body.removeChild(testDiv);
// Compare with default font size if (parseInt(computedFontSize) > 16) { return true; // Font size has been increased } return false; }
// Adjust the font size of the .navbar-brand based on zoom or large font settings function adjustNavbarFontSize() { var navbarBrand = document.querySelector('.navbar-brand');
- Assistant
- User
full code ot copdy
- Assistant
- User
// Function to detect browser zoom level function detectZoom() { var ratio = window.devicePixelRatio || 1; var zoom = Math.round(ratio * 100); return zoom; // Returns zoom percentage (100 = no zoom) }
// Function to detect if system font size has been increased function detectLargeFont() { var testDiv = document.createElement("div"); testDiv.style.fontSize = "16px"; testDiv.style.position = "absolute"; testDiv.style.visibility = "hidden"; document.body.appendChild(testDiv);
var computedFontSize = window.getComputedStyle(testDiv).fontSize; document.body.removeChild(testDiv);
// Compare with default font size if (parseInt(computedFontSize) > 16) { return true; // Font size has been increased } return false; }
// Adjust the font size of the .navbar-brand based on zoom or large font settings function adjustNavbarFontSize() { var navbarBrand = document.querySelector('.navbar-brand');
// Check for zoom level greater than 100% and large fonts if (detectZoom() > 100) { // If the user has zoomed in, reduce the font size navbarBrand.style.fontSize = '12px'; console.log("Zoom detected, adjusting font size."); } else if (detectLargeFont()) { // If the user has increased their system font size, reduce the font size navbarBrand.style.fontSize = '12px'; console.log("Large font size detected, adjusting font size."); } else { // If neither condition is met, use the default font size navbarBrand.style.fontSize = '21px'; console.log("Default settings detected, using default font size."); } }
- Assistant
- User
add that to // Function to detect browser zoom level function detectZoom() { var ratio = window.devicePixelRatio || 1; var zoom = Math.round(ratio * 100); return zoom; // Returns zoom percentage (100 = no zoom) }
// Function to detect if system font size has been increased function detectLargeFont() { var testDiv = document.createElement("div"); testDiv.style.fontSize = "16px"; testDiv.style.position = "absolute"; testDiv.style.visibility = "hidden"; document.body.appendChild(testDiv);
var computedFontSize = window.getComputedStyle(testDiv).fontSize; document.body.removeChild(testDiv);
// Compare with default font size if (parseInt(computedFontSize) > 16) { return true; // Font size has been increased } return false; }
// Adjust the font size of the .navbar-brand based on zoom or large font settings function adjustNavbarFontSize() { var navbarBrand = document.querySelector('.navbar-brand');
- Assistant