Customizing SMF > SMF Coding Discussion

Combine forum jump bar with quick reply bar?

<< < (3/4) > >>

Antechinus:
Ok, that's easy. The problem is that all items default to sitting at the left unless otherwise specified. Since you haven't specified anything else for your jump to, at the left is where it wants to sit. This should fix it:


--- Code: ---#display_jump_to {
float: right;
padding : 5px;
margin-top : 2px;
font-size: 0.8em;
}

--- End code ---

Try that. Let me know how it goes. :)

Groovystar:
Actually it did help! It's on the right side now. But now, it's stuck to the bottom. :P

Antechinus:
Try changing the top margin. You can use a negative value.


--- Code: ---#display_jump_to {
display: block;
float: right;
padding : 5px;
margin-top : -5px;
font-size: 0.8em;
}

--- End code ---

Groovystar:
That did it! OMG thank you!

So wait--the display: block;  value must be what did it? I'd tried various vertical-align CSS methods today and none worked up till now.

Antechinus:
Vertical-align wont do it. All that ever does is align images with text. The help icons in admin are an example. If you want icons like that aligned to the text they are with, you use the vertical-align thingy. It wont do anything for the positioning of other elements. You have to use other tricks for that.

A span is an inline element by default, and wont accept negative top margins. Using display: block; makes it behave like a block level element (a div is a good example) which means you can then haul it upwards by using a negative top margin if you have to.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version