Home Entrance Everyone Wiki Search Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
April 27, 2024 - @365.83 (what is this?)
Forum activity rating: Four Star Posts: 79/1k.beats Unread Topics | Unread Replies | Own Posts | Own Topics | Random Topic | Recent Posts
News: :ha: :pc: Hello Melonland! :pc: :happy:

+  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 351 times)
BananaBoots
Jr. Member ⚓︎
**


↑ Soooooo normal about him (lying)

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.


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
Gans
Sr. Member
****


Scrap Vulture


View Profile

First 1000 Members!€100 IRC InvestmentJoined 2022!
« 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)

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)

HELP: troubles in implementing iframe to my existing layout

Started by morrysillusionBoard ☔︎ ∙ I need Help!

Replies: 8
Views: 1774
Last post June 07, 2022 @522.55
by Melooon
Which layout looks better?

Started by PepyogurtBoard ✁ ∙ Web Crafting

Replies: 5
Views: 948
Last post August 24, 2022 @381.30
by Guest
I redid my site layout

Started by JackFrostBoard ☆ ∙ Showcase & Links

Replies: 3
Views: 631
Last post December 04, 2022 @155.73
by JackFrost

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies Forum Guide | Rules | RSS | WAP2


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