Home Events! Entrance Everyone Wiki Search Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
November 21, 2024 - @978.13 (what is this?)
Forum activity rating: Three Stars Posts: 29/1k.beats Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts    Start New Topic
News: :dive: Are u having fun?? :dive:

+  MelonLand Forum
|-+  World Wild Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  HELP: Can't get layout to look right


« previous next »
Pages: [1] Print
Author Topic: HELP: Can't get layout to look right  (Read 522 times)
BananaBoots
Jr. Member ⚓︎
**


↑ Soooooo normal about him (lying)

⛺︎ My Room
StatusCafe: bananaboots
iMood: bananaboots
Itch.io: My Games

View Profile WWW

First 1000 Members!Joined 2023!
« on: June 17, 2023 @715.88 »

I'm making a page for one of my OCs right now and I just can't get the layout to look how I want it to :tnt: I want it to look like this:



With the OC on the left and a box containing a bio about them on the right. I have the box and the image, that's easy enough, but the box is at the character's feet instead of level with their head and I can't quite get them to be centered. Any help is very much appreciated!

Oh, and this is the code I have already:
Code
<!DOCTYPE html>

<html>
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>~credits~</title>

        <!-- favicon -->
        <link rel="icon" type="image/x-icon" href="img/mini_icon.png">

    </head>

    <body>

      <header>
        <a href="/ocs/index.html"><img src="https://cdn.discordapp.com/attachments/1115206156114214962/1119649894249009222/backd8.gif" alt="Back" height="20px" width=auto></a>
      </header>

      <div class="oc">

        <img src="https://cdn.discordapp.com/attachments/1117574458266370148/1117771364498149487/CruzFullbody.png" width="500px" height=auto alt="A fullbody image of Cruz. They have dark skin, green eyes and braids. They're wearing an orange jumper, overalls and pink Converse. Their posture is relaxed and they have one hand raised in a peace sign.">

      </div>

      <div class="box">

        <br>

        <h1>Cruz</h1>

        <p>This is Cruz</p>

        <br>

      </div>

      <style>

        body{
            background-image: linear-gradient(#b2f7ef, #f7d6e0);
            background-repeat: no-repeat;
            background-size: cover;
            font-size: 16px;
            color: #9F2B68;
        }

        .box{
          display: inline-block;
          background-color: pink;
          border: 3px solid #9F2B68;
          min-width: 750px;
        }

        .oc{
          display: inline-block;
          margin-bottom: 75px;
        }

        p {
          margin-right: 25px;
          margin-left: 25px;
        }

        a:link {
            color: #9F2B68;
        }

        a:visited {
            color: #9F2B68;
        }

        a:hover {
            color: #9F2B68;
        }

        a:active {
            color: #9F2B68;
        }

      </style>

    </body>

</html>
Logged

Boots (it/he)

wris
Jr. Member ⚓︎
**


Safe when used as directed.

⛺︎ My Room

View Profile WWW

First 1000 Members!Joined 2022!
« Reply #1 on: June 17, 2023 @727.42 »

If you want to position elements next to each other and control their vertical alignment, etc., you could take a look at the CSS display: flex; property.

You'll end up with something like:

Code
<div style="display: flex; flex-direction: row;">
  <div><!-- image goes in here --></div>
  <div><!-- text goes in here --></div>
</div>
Logged
Memory
Guest
« Reply #2 on: June 17, 2023 @766.79 »

Use align="left" as an argument inside the <img> tag. Text should wrap on the right side of the image.
Logged
BananaBoots
Jr. Member ⚓︎
**


↑ Soooooo normal about him (lying)

⛺︎ My Room
StatusCafe: bananaboots
iMood: bananaboots
Itch.io: My Games

View Profile WWW

First 1000 Members!Joined 2023!
« Reply #3 on: June 17, 2023 @895.80 »

If you want to position elements next to each other and control their vertical alignment, etc., you could take a look at the CSS display: flex; property.

You'll end up with something like:

Code
<div style="display: flex; flex-direction: row;">
  <div><!-- image goes in here --></div>
  <div><!-- text goes in here --></div>
</div>

Thank you, this was exactly what I needed! I completely forgot about flexbox :drat:
Logged

Boots (it/he)

Pages: [1] Print 
« previous next »
 

Vaguely similar topics! (3)

Show your spacehey layouts!

Started by LIABoard ✁ ∙ Web Crafting

Replies: 9
Views: 1014
Last post April 18, 2023 @732.50
by halcybutton
Melons critiquing and helping each other

Started by urgellxBoard ✎ ∙ Art Crafting

Replies: 22
Views: 1913
Last post August 24, 2024 @487.13
by e-
Finally built a custom layout!

Started by night-at-the-musianBoard ☆ ∙ Showcase & Links

Replies: 6
Views: 1024
Last post January 09, 2024 @284.86
by night-at-the-musian

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies 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