473,626 Members | 3,305 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

EXT JS and vertical align

Ciary
247 Recognized Expert New Member
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 8236
acoder
16,027 Recognized Expert Moderator MVP
Do you have a link?
Apr 16 '09 #2
Ciary
247 Recognized Expert New Member
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
12425
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 application). I have an issue when the span has a heigth less than 18px (meaning height of the span, there is only one line of text and the height of the text is less than 18). The issue is that I start getting a padding, I add a color background to...
8
30897
by: abracad | last post by:
Hi Is it possible to vertically align an image in the middle of a DIV of fixed height?
10
66027
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" height="29" alt="Wir schreiben die Geschichte Ihres Unternehmens."></div>
1
7892
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 100% and vertically center content inside of it. Therefore, I'm seeking a way, preferably in CSS to vertically center a site. Here's more of a visual to what I have: /********************************
2
12138
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 looked made for that. The effect I want is img heading img heading img heading or heading
4
2260
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 to align both text and the image (some time appended in the same cell) in the top. Can anyone help me in this? --
5
4814
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 doing this demo with tables. The main problems are the vertical centering of the info area, and of the text inside the squares.
3
4414
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%; min-height:100%; } body{ vertical-align:middle;
8
3524
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: body { font-family: Trebuchet MS, Arial; cursor : default; background:#000000 url("Images/long-template.jpg"); background-repeat:no-repeat; background-position: center; background-attachment:scroll; height: 1228px;
40
5473
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: http://htmlhelp.com/reference/css/text/vertical-align.html
0
8701
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8364
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7192
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6122
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5571
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4196
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1507
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.