Multiple textareas on a pet profile

Subeta provides a div to put all of your pet information in – it’s called #pet_desc. But what if you want to have several different divs for different information, and position them all separately? Not a problem.

First of all, I recommend leaving the #pet_desc div alone. Don’t give it any positioning, as it’ll effect the positioning of the divs we put inside it.

Now we’ll need to use some HTML to add new divs to the page. They will automatically appear within the #pet_desc div, which is fine.

<div id="one">
BLAH BLAH BLAH
</div>

<div id="two">
BLAH BLAH BLAH
</div>

<div id="three">
BLAH BLAH BLAH
</div>

Now we have three different areas to put text. They all have a unique id so that we can style them separately with CSS. We can position them, give them a width and height – basically anything!

<style>
#one {
position: absolute;
top: 50px;
left: 100px;
width: 100px;
height: 100px;
border: 1px solid blue;
}

#two {
position: absolute;
top: 50px;
left: 300px;
width: 300px;
height: 100px;
border: 1px solid green;
}

#three {
width: 400px;
height: 100px;
border: 1px solid red;
overflow: auto;
}
</style>

If you liked this post, check out Customizing Your Pet’s Stat Bars!

Have any questions or comments? Feel free to comment on this post!

CategoryPet Profiles   Tags,
  Comments2

2 Comments

  • Feb 26 2011
    @ 1:47 pm
    sparkywheezle

    I love this! I have been wondering how to have more text areas!

    Question: Please clarify, can these boxes be positioned anywhere, (including outside the #pet_desc area)?

    Also, there is limited information about making custom Journal pages, it sure would be fun to make a customized journal.

    Thanks for all your great work

  • Feb 26 2011
    @ 4:04 pm
    Sammii

    sparkywheezle

    Yes, as long as the #pet_desc div does not have any positioning on it, the divs that are inside it can be positioned anywhere on the page. :)

    Thanks for the suggestion, I will definitely look at journals for upcoming tutorials!

Leave a Comment