Entrance Events! Chat Gallery Search Everyone Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
February 23, 2025 - @141.82 (what is this?)
Activity rating: Three Stars Posts & Arts: 39/1k.beats ~ Boop! The forum will close in 859.beats! Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts Start New Topic  Submit Art
News: ozwomp is requesting your location  :ozwomp: [Agree] Super News: E-Zine #3 Accepting Entries!

+  MelonLand Forum
|-+  World Wild Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  help with making element fullscreen


« previous next »
Pages: [1] Print
Author Topic: help with making element fullscreen  (Read 95 times)
brightbluebug
Casual Poster
*

⛺︎ My Room

View Profile

Joined 2024!
« on: February 08, 2025 @74.13 »

i'm working on updating a small generator i made some time ago (https://acatalepsy.neocities.org/colorlessgreen) visually along with some more code changes. i want the background to be a color and fill the whole screen. however, it leaves a margin of white at the edges for some reason. (i'm following some other online thing for height, because when i tried setting it to 100% it didn't work (though width did)). i've messed around with some things & deleted some stuff, but nothing seems to work. i'm certain i just have something left somewhere, but i just can't find it. help greatly appreciated! thank you!

here's my css and html:
Code
<!DOCTYPE html>
<html class="html">
<head>
    <link rel="stylesheet" href="green.css">
</head>
<source>
<div class="body">
    <div class="header">
        <p id="title">COLORLESS IDEAS</p>
        <p id="subscript">...sleep furiously</p>
        <p id="desc">a "grammatically correct, semantically nonsensical" sentence generator</p>
    </div>
    <div class="content">
        <p><button id="button1" onclick="genstuff()">generate</button></p>
        <p id="text">colorless green ideas sleep furiously</p>
        <script src="newideas.js"></script>
        <script src="ideas.js"></script>
        <textarea id="textbox" cols="50" rows="10">type up something here. if you want. make an attempt at meaningful interpretation, or, uh, something...</textarea>
    </div>
    <div class="description">
        <p>
            information here blah blah
        </p>
    </div>
</div>
Code
.html{
    padding:0%;
}
.body{
    background-color:seagreen;
    margin-left: 0px;
    width:100%;
    height:100%;
    padding-top: 50px;
    scroll-behavior: smooth;
    overflow-y: scroll;
    position:fixed;
}

.header{
    width: 40%;
    height: auto;
    border-radius: 5px;
    border-color:black;
    border-style: groove;
    background-color:lightgrey;
    padding: 5px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 25px;
    line-height: 10px;
    text-align: center;
}

.description{
    width: 40%;
    height: auto;
    border-radius: 5px;
    border-color:black;
    border-style: groove;
    background-color:lightgrey;
    padding: 5px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 25px;
    line-height: 10px;
    text-align: center;
}

#title{
    margin-left:auto;
    margin-right:auto;
    font-family: fantasy;
    font-size: large;
    font-weight: 700;
}

#subscript{
    font-size:small;
    font-style: italic;
}

.content{
    width: 50%;
    margin-left: auto;
    margin-right:auto;
    text-align: center;
    padding-bottom: 25px;
    border-radius: 5px;
    margin-bottom:25px;
    border-color:black;
    border-style: groove;
    background-color: lightgray;
}

#button1{
    background-color: seagreen;
    width: 100px;
    height:25px;
    text-align: center;
    font-family: fantasy;
}
#text{
    margin-left: 100px;
    margin-right:100px;
    text-wrap:wrap;
    text-align: center;
}

#textbox{
    border-style: inset;
}

#desc{
 
}
Logged
gardengremlin
Newbie ⚓︎
*

⛺︎ My Room

View Profile WWW

Joined 2025!
« Reply #1 on: February 09, 2025 @364.22 »

Hello!

To me it looks like padding or margins with the html or body.

I can see you've got `.html` and `.body`, but maybe try without the `.` so you're just applying to the element itself.

If that doesn't work, maybe try chucking this at the top


Code
html,
body {
  margin: 0;
}


This just 'normalises' and resets those elements to have 0 margin. Hopefully that gets rid of the white border for you, but if not let me know and I'm happy to help further!
Logged
brightbluebug
Casual Poster
*

⛺︎ My Room

View Profile

Joined 2024!
« Reply #2 on: February 11, 2025 @813.13 »

@gardengremlin it works! thanks so much : )
Logged
gardengremlin
Newbie ⚓︎
*

⛺︎ My Room

View Profile WWW

Joined 2025!
« Reply #3 on: February 11, 2025 @860.93 »

@brightbluebug Glad it works :) Good luck with the rest of your site!
Logged
Pages: [1] Print 
« previous next »
 

Vaguely similar topics! (3)

I am new to making sites and I want some tips to improve.

Started by Icey!Board ☔︎ ∙ I need Help!

Replies: 4
Views: 2380
Last post December 14, 2021 @853.48
by Icey!
php heck: making a search engine

Started by cinniBoard ☔︎ ∙ I need Help!

Replies: 2
Views: 2159
Last post February 22, 2022 @256.30
by ellievoyyd
making a game character in blender

Started by cinniBoard ➶ ∙ Art Gallery

Replies: 7
Views: 2824
Last post June 08, 2022 @501.32
by Memory

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