Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

why doesn't the red div position to the left of the black div?

Hi, I'm trying to make a website for my school's speech and debate team. I anonymized and gave the team's officers and staff fake names so that they don't get found because I don't want to reveal my ID online before it becomes time to publish the web page with their permission.

Anyways, I'm having trouble making this website so that the menu div comes to the left of the other div but not beneath it. It appears beneath the other div but also to the left of it which I don't want. Here's my code:

https://codeshare.io/5DM4b3

Here's how I want the page to be formatted:

first-Template imgbb.com

Could someone help me with this? I'm new to the whole web development thing. I'm making this along with a course I am taking in web development.
I'm no expert in it, but the issues I've dealt with like this are usually around the widths of the elements. The HTML renderer will just put things after one another if the widths don't line up. Try using relative widths instead of absolute pixel ones as well, might help
This whole page is just one big joke. I realize you're learning HTML and CSS now, but it's literally built for one screen size.

Put both the red and black background divs inside a single parent and add the following class properties to it
Code
.container {
   display: flex;
}

I don't understand why your .container (inside another container) has a fixed width of A THOUSAND PIXELS. This is insanely huge, and makes no sense. Only the parent should be setting the width of the children, and they should be conforming to whatever size they have available.
Code
#container {
    text-align: center;
    background-color: black;
    width: 1000px; /* remove this BS */
    margin-left: auto;
    margin-right: auto;
    float: right;
}

Using float is real aids, I couldn't even tell you the last time I used it.

If you have a 1000px width div, and a 500px with div, I don't see how you are expecting to throw in ANOTHER div that is the same size as the red one. Unless you're marketing to someone with a monitor width of 2k pixels, you need to rethink all of this.
Je t'aime
[Image: fpZ5a5g.png]
(Apr 22, 2022 04:39 PM)-Scrub Wrote:  Jokes on you, I'm not smart enough to know what he's talking about.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by EffexionApr 15, 2021 05:12 AM 10 278 Apr 15, 2021 05:12 AM
Last Post: Goku
by CarrotDec 24, 2020 12:16 PM 0 244 Dec 24, 2020 12:16 PM
Last Post: Carrot
by randomFunPartyNov 19, 2019 04:22 AM 5 153 Nov 19, 2019 04:22 AM
Last Post: Nachfolger