Entrance Events! Chat Gallery Search Everyone Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
February 05, 2025 - @745.52 (what is this?)
Activity rating: Four Stars Posts & Arts: 96/1k.beats Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts Start New Topic  Submit Art
News: :dive: Are u having fun?? :dive: Super News: E-Zine #3 Accepting Entries!

+  MelonLand Forum
|-+  World Wild Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  CSS grid is different on chrome and mozilla


« previous next »
Pages: [1] Print
Author Topic: CSS grid is different on chrome and mozilla  (Read 234 times)
EdenInTheGardens
Casual Poster ⚓︎
*


⛺︎ My Room

View Profile WWW

Exams successfully passed !is in the gardens Joined 2024!
« on: December 10, 2024 @562.60 »

Hello hello everyone !

So, to begin I have my website which you can find here, and for it I have used a grid because I thought it would make it easier, now on mozilla it looks the way I intend it to look but on chrome it looks um... wack, does anyone know why that is ?

Putting the code in the spoiler section ! The way I code is messy and kinda spaghetti like so there's probably a very easy solution to this but I don't even have the time to sit down and have a look at it anymore  :seal:

Spoiler
             .parent {
 margin: auto;
max-width: 940px;
height: 700px;
display: grid;

grid-template-columns: repeat(5, 1fr);
grid-template-rows: repeat(5, 1fr);
grid-column-gap: 0px;
grid-row-gap: 0px;

And then each element on the grid :

.two {
              display: grid;
grid-column-start: 1;
grid-column-end: 5;
grid-row-start: 2;
grid-row-end: 5;
z-index: 0;
pointer-events: none;
            }
 aside {
              display: grid;
              grid-column: 2 ;
              grid-row: 2 ;
                background-color: #FBDD6E;
             
                width: 150px;
                padding: -1px;
                margin: 5px;
                }
main {
              display: grid;
              grid-column : 3 / 5 ;
              grid-row : 2 / 2 ;
                background: bottom;
                background-color: #EEB3FF;
                background-image: url("https://strange-things-happen.neocities.org/dandelions.png");
                background-size: 100%;
                background-repeat: no-repeat;
                color: #B71887;
               
                flex: 1;
                padding: 20px;
                margin: 5px;
                border-image: url("https://64.media.tumblr.com/47d4d7688278aee63436613bc8843674/fb978ef4c9e61e33-3e/s500x750/4f5f3b69a346a35014643b171c933f2ba1acbcca.pnj");
                border:2px dashed #B71887;
                order: 2;
            }
#musictv {
                display: grid;
                grid-column: 4;
                grid-row: 3;
                position: relative;
                z-index: 2;
                pointer-events: none;
              }
             
              #musicvideo {
                display: grid;
                grid-column: 4;
                grid-row: 3;
                z-index: 1;
                position: relative;
                align-items: center;
              }
             
[close]

Thank you everyone !! Also sorry clicked send on accident before finishing the post...oops
« Last Edit: December 10, 2024 @564.19 by EdenInTheGardens » Logged

DougsShack
Casual Poster ⚓︎
*


⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: dougsshack
XMPP: Chat!

View Profile WWW

It's Doug. He has a shack. Doug's Shack !Joined 2024!
« Reply #1 on: December 17, 2024 @972.56 »

The culprit here is your header. You can fix it by changing your .header to a grid-column of 1/6

Code
.header {
    grid-column: 1/6; 
                
    background-repeat: no-repeat;
    background-size: contain;
}


Your entire CSS should look like this now:

Code
:root {
    --header-image: url("https://strange-things-happen.neocities.org/sth%20daytime.png");
    --content: #483457;
}

@font-face {
    font-family: PixelOperator;
    src: url(fonts/PixelOperator.ttf);
}

* {
    font-family: PixelOperator;
}

.parent {
    margin: auto;
    max-width: 940px;
    height: 700px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    grid-column-gap: 0px;
    grid-row-gap: 0px;
}

body {
    margin: auto;
    background-color: white;
    color: #B71887;
    background-image: url("https://strange-things-happen.neocities.org/sth%20bg%20night.png");
    image-rendering: pixelated;
    background-attachment: fixed;
    background-position: 25%;
    background-size: cover;
    background-repeat: no-repeat;
}

* {
    box-sizing: border-box;
}

#container {
    margin: auto;
    max-width: 100%;
    max-height: 880px;
}

.header {
    grid-column: 1/6;
    background-repeat: no-repeat;
    background-size: contain;
}

.header img {
    height: 100%;
    width: 100%;
    object-fit: contain;
}

.two {
    display: grid;
    grid-column-start: 1;
    grid-column-end: 5;
    grid-row-start: 2;
    grid-row-end: 5;
    z-index: 0;
    pointer-events: none;
}


#newsdiv {
    position: fixed;
    height: 150px;
    width: 100px;
    overflow: scroll;
    z-index: 9;
    background-color: grey;
    color: black;
    padding: 1px;
    right: 380px;
    top: 80px;
    cursor: pointer;
    border: outset;
    text-align: center;
    text-decoration: none;
}

#newsdiv::-webkit-scrollbar {
    width: 5px;
}

#newsdivHeader {
    height: 18px;
    cursor: move;
    z-index: 10;
    background: rgb(6, 9, 58);
    background: linear-gradient(90deg, rgba(6, 9, 58, 1) 0%, rgba(98, 13, 116, 1) 58%);
    text-align: center;
    color: white;
}

/* navigation section!! */

/* this colors BOTH sidebars
if you want to style them separately,
create styles for #leftSidebar and #rightSidebar */
aside {
    display: grid;
    grid-column: 2;
    grid-row: 2;
    background-color: #FBDD6E;

    width: 150px;
    padding: -1px;
    margin: 5px;
    /* this makes the sidebar text slightly smaller */
}

.sidebarbtn:hover {
    filter: hue-rotate(230deg);
}

#navigationButton {
    filter: grayscale(80%);

}

.sidebarbtn {
    border: groove #F8B175;
    display: flex;
}


/* this is the color of the main content area,
between the sidebars! */

main {
    display: grid;
    grid-column: 3 / 5;
    grid-row: 2 / 2;
    background: bottom;
    background-color: #EEB3FF;
    background-image: url("https://strange-things-happen.neocities.org/dandelions.png");
    background-size: 100%;
    background-repeat: no-repeat;
    color: #B71887;
    flex: 1;
    padding: 20px;
    margin: 5px;
    border-image: url("https://64.media.tumblr.com/47d4d7688278aee63436613bc8843674/fb978ef4c9e61e33-3e/s500x750/4f5f3b69a346a35014643b171c933f2ba1acbcca.png");
    border: 2px dashed #B71887;
    order: 2;
}

#innerbox {
    width: auto;
    position: relative;
    background-color: #edeab7;
    padding: 5px;
    padding-right: 20px;
    margin: auto;
    image-rendering: initial;
}

#innerboxb {
    background-color: #edeab7;
    overflow: scroll;
    margin: auto;
    width: 650px;
    padding: 5px;
    image-rendering: initial;
}

.collumn {
    float: left;
    width: 50%;
    padding: 5px;
}

.center {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 70%;
    text-align: center;
}

#musictv {
    display: grid;
    grid-column: 4;
    grid-row: 3;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

#musicvideo {
    display: grid;
    grid-column: 4;
    grid-row: 3;
    z-index: 1;
    position: relative;
    align-items: center;
}

#chatbox {
    display: grid;
    grid-column: 2;
    grid-row: 3;
    width: 150px;
}

.gifsidebar {
    z-index: 2;
}

iframe {
    object-position: top;
}

/* what's this "order" stuff about??
allow me to explain!
if you're using both sidebars, the "order" value
tells the CSS the order in which to display them.
left sidebar is 1, content is 2, and right sidebar is 3! */

* #leftSidebar {
    order: 1;
}

#rightSidebar {
    order: 3;
}

.footer {
    background-color: #EEB3FF;
    display: grid;
    grid-column: 2 / 5;
    grid-row: 4;
    width: auto;
    height: 45px;
    padding: 5px;
    margin: 5px;
    border: 2px dashed #B71887;
    text-align: center;
    align-items: center;
    z-index: 2;
}

#spacestamp {
    -position: center;
}

h1,
h2,
h3 {
    color: #B71887;
}

h1 {
    font-size: 25px;
}

strong {
    /* this styles bold text */
    color: #882D19;
}

/* this is just a cool box, it's the darker colored one */
.box {
    background-color: #F7D394;
    padding: 10px;
}

/* CSS for extras */

/* BELOW THIS POINT IS MEDIA QUERY */

/* so you wanna change the width of your page? 
by default, the container width is 900px.
in order to keep things responsive, take your new height,
and then subtrack it by 100. use this new number as the 
"max-width" value below
*/

@media only screen and (max-width: 600px) {
    #flex {
        flex-wrap: wrap;
    }

    aside {
        width: 100%;
    }

    /* the order of the items is adjusted here for responsiveness!
since the sidebars would be too small on a mobile device.
feel free to play around with the order!
*/
    main {
        order: 1;
    }

    #leftSidebar {
        order: 2;
    }

    #rightSidebar {
        order: 3;
    }

    #navbar ul {
        flex-wrap: wrap;
    }
}
« Last Edit: December 17, 2024 @983.96 by DougsShack » Logged

No trees were harmed to post this message,
but a large number of electrons were terribly inconvenienced.
EdenInTheGardens
Casual Poster ⚓︎
*


⛺︎ My Room

View Profile WWW

Exams successfully passed !is in the gardens Joined 2024!
« Reply #2 on: December 20, 2024 @795.84 »


The culprit here is your header. You can fix it by changing your .header to a grid-column of 1/6

Oh my god thank you so much ! I'm relieved it was an easy fix, thank you again!!
Logged

Pages: [1] Print 
« previous next »
 

Vaguely similar topics! (3)

Anyone have an old Chromebook they're not using?

Started by OnioBoard ⛽︎ ∙ Technology & Archiving

Replies: 12
Views: 1336
Last post January 15, 2023 @708.11
by Memory
making a site layout with grids

Started by tallyhallBoard ☔︎ ∙ I need Help!

Replies: 2
Views: 262
Last post August 06, 2024 @78.73
by tallyhall
Ozwomp's Voyage for Android

Started by MelooonBoard ⚛︎ ∙ Melon's Junk

Replies: 5
Views: 302
Last post November 13, 2024 @977.81
by candycanearter07

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | ~ Send Feedback ~ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi