Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, juanex, Grant), 1,018 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
short html/css question #164604
10/31/07 12:29
10/31/07 12:29
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline OP
Senior Expert
ello  Offline OP
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
how can i use vertical-align? i want to create a div-section where the text is aligned at the bottom of the field.

any hints are welcome

Re: short html/css question [Re: ello] #164605
10/31/07 12:53
10/31/07 12:53
Joined: Mar 2005
Posts: 969
ch
Loopix Offline
User
Loopix  Offline
User

Joined: Mar 2005
Posts: 969
ch
Put the div section in a table and then format the cell with valign="bottom" (honestly I don't know...but I would try it like this)

Re: short html/css question [Re: Loopix] #164606
10/31/07 12:57
10/31/07 12:57
Joined: Jun 2005
Posts: 4,875
broozar Offline
Expert
broozar  Offline
Expert

Joined: Jun 2005
Posts: 4,875
yeah or style="position:absolute; bottom: 5px"

Re: short html/css question [Re: broozar] #164607
10/31/07 13:06
10/31/07 13:06
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline OP
Senior Expert
ello  Offline OP
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
hm, broozar, yours doenot work here.. and tables are no choice... i guess i'll stick with position:relative; and top:180px;

sadly, because if the div's height changes i have to change the positions of the text as well..

Re: short html/css question [Re: broozar] #164608
10/31/07 13:08
10/31/07 13:08
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
oh my god no tables! I thought position:absolute will put the text at the very bottom. It can't be done in one time, I think. You need to define two more divs in that div, the first div with a width of 100% and the height of the parent div minus 10px. Then the second div a width of 100% and a height of 10px. Put the text in that div and center horizontally.


Click and join the 3dgs irc community!
Room: #3dgs
Re: short html/css question [Re: Joozey] #164609
10/31/07 13:14
10/31/07 13:14
Joined: Jun 2005
Posts: 4,875
broozar Offline
Expert
broozar  Offline
Expert

Joined: Jun 2005
Posts: 4,875
position:absolute defines the position relative to its parent. so you have to use a container div for the area you are working on, and then insert the div with absolute and bottom.

Re: short html/css question [Re: broozar] #164610
10/31/07 13:37
10/31/07 13:37
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
There is a css style element called vertical-align, so you would have a css file:
Code:

#show_bottom
{
vertical-align: bottom;
(all the other stuff you need)
}


And use that as id for your div element in html:
Code:

<div id="show_bottom">
your content
</div>



You could set it up as class and thus use it for different elements:
Code:

.show_bottom
{
vertical-align: bottom;
}

//in html:
<div id="bla" class="show_bottom">
your content
</div>



That should work.

@broozar:
position: absolute defines the position absolute on the screen.
position: relativ defines the position relativ to its parent element or previous element afaik (could be wrong here though)

edit:
Sorry broozar, of course you are right.
@ello for more details about that position stuff and all other html/css related questions take a look at this:
http://de.selfhtml.org/navigation/suche/index.htm?Suchanfrage=position%3A+relativ

Last edited by Xarthor; 10/31/07 13:39.
Re: short html/css question [Re: Xarthor] #164611
10/31/07 13:42
10/31/07 13:42
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline OP
Senior Expert
ello  Offline OP
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
xarthor, thats what i tried before posting my question. because it doesnt work.. i am using now two following divs, thats the simpliest and most compatible solution i can think of

Re: short html/css question [Re: ello] #164612
10/31/07 14:13
10/31/07 14:13
Joined: Jun 2005
Posts: 4,875
broozar Offline
Expert
broozar  Offline
Expert

Joined: Jun 2005
Posts: 4,875
small example:

<html>
<head>
</head>
<body>
<div style="position:absolute; width:500px; height:400px; top: 200px; background-color:#000">
<div style="position:absolute; color:#000fff; bottom:5px; right:3px">texttext</div>
</div>
</body>
</html>

both div blocks, the outer and the inner container, need the "position" tag. you can use % if you want...

deutsche css-resource: http://www.css4you.de/

Re: short html/css question [Re: broozar] #164613
10/31/07 15:17
10/31/07 15:17
Joined: Jan 2007
Posts: 221
F
Fenriswolf Offline
Member
Fenriswolf  Offline
Member
F

Joined: Jan 2007
Posts: 221
vertical-align doesn't work with block elements, but with inline elements only.
You can follow the suggestion of broozar and use absolute positions or you can use an inline element ('span' for example).


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1