473,397 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

EXT JS and vertical align

Ciary
247 Expert 100+
hi fellow coders,

i'm not sure if this is the right place to ask since it's rather specific. i've got some questions using EXT JS. i've been asking on there forum but i didn't get a reply there.seems like their forum is rather lazy compared to bytes :)

anyway, i'm trying to vertically position my text within my divs and doing this dynamically with a button. i figured out i needed to do this and i've done it using JS

align: top

Expand|Select|Wrap|Line Numbers
  1. <div style="position: absolute;">
  2.    <p style="top: 0%; margin: 0px; position: absolute; height: 20px">
  3.        Hi All!!!
  4.    </p>
  5. </div>
align: middle

Expand|Select|Wrap|Line Numbers
  1. <div style="position: absolute;">
  2.    <p style="top: 50%; margin: 0px; margin-top:-10px; position: absolute; height: 20px">
  3.        Hi All!!!
  4.    </p>
  5. </div>
align: bottom

Expand|Select|Wrap|Line Numbers
  1. <div style="position: absolute;">
  2.    <p style="top: 100%; margin: 0px; margin-top:-20px; position: absolute; height: 20px">
  3.       Hi All!!!
  4.    </p>
  5. </div>
(i'm not sending the code since it isn't the code thats not working)

so far, so good, and working fine.it did exacly what i wanted.

since that worked, i tried to implement Ext.resizable to make my div draggable and resizable. suddenly the vertical align didnt work anymore. i think the problem lies with the negative margin since the text is aligned to low. if i align it to 'bottom' it completely disappears.

does anyone know how i can fix this?
Apr 14 '09 #1
2 8218
acoder
16,027 Expert Mod 8TB
Do you have a link?
Apr 16 '09 #2
Ciary
247 Expert 100+
nvm, it wasn't an extjs problem. it was my own. i forgot +"px" when changing my top margin.
Apr 16 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: kAldam | last post by:
I am currently using IE 6.0 and 5.5 and the scenario is the following. I have a span that contains text, and the span is beign contained by a table cell (this is the way thing need to be in my...
8
by: abracad | last post by:
Hi Is it possible to vertically align an image in the middle of a DIV of fixed height?
10
by: Markus Ernst | last post by:
Hi I have a strange problem with vertical-align. The case can be viewed at http://www.brainput.info/geschichte.html. HTML code: <div id="bild"><img src="geschichte.gif" width="274"...
1
by: Kenneth | last post by:
Okay, I've been scouring Google for hours looking for a solution to this problem, but as of yet I can't find one. XHTML Transitional seems to specify that I can no longer set a table's height to...
2
by: Eric Lindsay | last post by:
If I want to have the middle of an image vertically aligned with the middle of a heading (or several lines of heading), is there some particular way people would recommend? vertical-align: center...
4
by: shivas | last post by:
Hi, I am using vertical-align for a table row, but the Image and the text are not aligned properly. I don't what to align image in the img tag, rather in the row itself I want to align. I want...
5
by: Markus Ernst | last post by:
Hello This is a test example: http://www.markusernst.ch/anthracite/ http://www.markusernst.ch/anthracite/living_divani.html After googling and experimenting for several hours, I ended up...
3
by: acunnon | last post by:
I am trying to put together an login page my problem is getting the three items aligned to the middle verticaly without specifing a height to anything on the page. CSS html{ height:100%;...
8
by: ayamopamo | last post by:
Hi- I am trying to center a web page. It seems like this should be very simple to do, but apparently it isn't my day. I have successfully centered the background by calling it in the css body tag:...
40
by: maya | last post by:
hi, how do I get text to vertical-align inside a div? http://www.mayacove.com/misc/home.html vertical-align should work, according to this:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.