Replies

Jun 12, 2015 10 years ago
Adventure Captain
sonata
User Avatar

Okay so let me see if I can answer this bit by bit. I'll admit that I hadn't looked too closely on your pet profile so forgive me for all of it not fitting exactly. I took it straight from something I had coded for someone else.

Actually the height and overflow attributes aren't needed. The same goes for the background-image. Those were remnants from that particular profile where the background image has some blank space I was hiding. The position, width and margin attributes are the cornerstones of this way of centering.

Looking at your code now I would say the profile is off center because the containing div, , is far wider than the content inside it needs it to be. As it is now you have a centered 900px div that's centered, but inside it are left-aligned divs at only a 700px-ish width. Also you can easily space the three top sections (minion, pet and stats) evenly by giving those three columns a width of 33%.

At least that's how I see it.

Art by
[tot=sonata]

Jun 12, 2015 10 years ago
Melina_540
only has room for one
User Avatar
Eliwood Anderson

- But that'll change the size of everything. I...I...

- Ohhhhh...uhhhhh...ummm....um...so I need to reset to 700px-ish...and it should center? Well, I'll try it. Edit: Uh...the is centered now...WAHOO! But uh...the p1/p2/pet treasure sections are still off...I removed the left: 0px part but that hasn't really helped...what am I supposed to replace it with? Note: Pet treasure aligns differently...no matter if I set them to 0px or not...so that one may be a little more complicated than p1 & p2.

Wormwood falls from the sky
a soul denied, twice will die

Jun 13, 2015 10 years ago
egg
is a bad egg
User Avatar

So I looked at your code, and you have "center:0px" for some things, which isn't actually valid. But for your pet treasure being off, just add "left:5px" to the pet_treasure section and that should line it up with the others. (At least it did for me)

Jun 13, 2015 10 years ago
Melina_540
only has room for one
User Avatar
Eliwood Anderson

What am I supposed to do? Using left: 0px aligns it wrong, right: 0px aligns it wrong, and apparently center: 0px is invalid...having nothing to align it...aligns it WAY wrong.

Wormwood falls from the sky
a soul denied, twice will die

Jun 13, 2015 10 years ago
egg
is a bad egg
User Avatar

As I said, use "left:5px". Not 0px, 5px. And that should fix it.

It seems that you're not all the familiar with CSS, which is fine, but it makes it harder for us to help you. I would look at some of the tutorials here and get acquainted with it first before you continue or start another pet profile. Tutorials that you should definitely look at are: Intro, Selectors, Syntax, Positioning, Align, Display, Box Model, Dimension, Padding, Margin, Border, Backgrounds, Fonts, Text, and Links, as these are things you'll most likely use on pet profiles.

Jun 14, 2015 10 years ago
Melina_540
only has room for one
User Avatar
Eliwood Anderson

- Hmm...the only way to get it to center is by using % not px...this could get fun...and yes, that is working (so far). And no, I don't know much about coding...I'll be the first to admit that...but I do know some of the minor basics...spending almost 7 years on that other pet site...I had to have learnt something. Edit 1: That % thing only works up to 80%...well, it's a bit small for my tastes but it's centered...and as long as it's centered...I can deal with it being a bit small. I should probably keep track of that page...either that or you...or both. :P Edit 2: Well...it works for the pd1/pd2 boxes...but using that % and margin-left & margin-right...I tried subtracting part of the % off the pet treasure box but it stays where it's aligned NOW...which means subtracting part of the % off it will cause it to resize...but it won't realign...and shouldn't it with the margin-left/right? scratches head I think that box hates me. Edit 3: Hmm...I didn't realize using those two margins...that I could still use left...but between those two margin's and left: 5px...it worked. I didn't know if setting the width to that pet treasure box to 78.5 would work (since I didn't know if the .5 would count or just mess it up) since 78 was to small and 79 was to big...but it did. And as far as I can tell now...everything's centered...it MIGHT be a px off here or there...but not that I can tell. YAY! WAHOOOOO! Thanks again!

Wormwood falls from the sky
a soul denied, twice will die

Please log in to reply to this topic.