HTML formatting question

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
crisg0112
Posts: 395
Joined: Fri Jan 31, 2014 3:45 am
Location: Melbourne, Australia

HTML formatting question

Post by crisg0112 »

Hi,

On a HTML cell, I have the following

<div style="text-align:center">
<a href="#">User Action1</a>
<a href="#">User Action2</a>
</div>

I am expecting it to be displayed in the center of the form but they don't.

Is my html code correct?
Thanks in advance!

Cris
MSSQL 2008R2, Aware 7 b2146, IE11, , Firefox 35.0.1, Windows 8 Bootstrap theme
BenHayat
Posts: 2749
Joined: Thu Dec 23, 2010 5:48 am
Location: Fla, USA
Contact:

Re: HTML formatting question

Post by BenHayat »

crisg0112 wrote:Hi,

On a HTML cell, I have the following

<div style="text-align:center">
<a href="#">User Action1</a>
<a href="#">User Action2</a>
</div>

I am expecting it to be displayed in the center of the form but they don't.

Is my html code correct?
I have tried many different ways, but it seems like Aware's system overwrites the center alignment and it becomes left justified.
crisg0112
Posts: 395
Joined: Fri Jan 31, 2014 3:45 am
Location: Melbourne, Australia

Re: HTML formatting question

Post by crisg0112 »

BenHayat wrote:
crisg0112 wrote:Hi,

On a HTML cell, I have the following

<div style="text-align:center">
<a href="#">User Action1</a>
<a href="#">User Action2</a>
</div>

I am expecting it to be displayed in the center of the form but they don't.

Is my html code correct?
I have tried many different ways, but it seems like Aware's system overwrites the center alignment and it becomes left justified.
Hi Ben,

thanks. Happy that's its not me :p

Support, can you verify if this is how it should work? And why can't we use our own alignment if its an HTML cell anyway?
Thanks in advance!

Cris
MSSQL 2008R2, Aware 7 b2146, IE11, , Firefox 35.0.1, Windows 8 Bootstrap theme
rob_h7
Posts: 85
Joined: Mon Jan 25, 2010 3:52 am

Re: HTML formatting question

Post by rob_h7 »

Stick a width on it & it'll work

Code: Select all

<div style="text-align:center;width:900px;">
<a href="#">User Action1</a>
<a href="#">User Action2</a>
</div>
It's something to do with the new responsive forms, you have to define a width in a div in pixels (percent doesnt work).

If you find a way of getting div wdith=% then let me know as I haven't cracked it yet.
Rob . Aware 8.4 (build 2718), Developer Edition, using Linux, MYSQL
crisg0112
Posts: 395
Joined: Fri Jan 31, 2014 3:45 am
Location: Melbourne, Australia

Re: HTML formatting question

Post by crisg0112 »

rob_h7 wrote:Stick a width on it & it'll work

Code: Select all

<div style="text-align:center;width:900px;">
<a href="#">User Action1</a>
<a href="#">User Action2</a>
</div>
It's something to do with the new responsive forms, you have to define a width in a div in pixels (percent doesnt work).

If you find a way of getting div wdith=% then let me know as I haven't cracked it yet.
Thanks Rob, that works!
Thanks in advance!

Cris
MSSQL 2008R2, Aware 7 b2146, IE11, , Firefox 35.0.1, Windows 8 Bootstrap theme
RafaMD
Posts: 52
Joined: Wed Mar 16, 2011 6:22 am
Location: Spain

Re: HTML formatting question

Post by RafaMD »

The problem is that the parent div of html cell has no specific width.

I solved overwritting the default settings whith this class:

Code: Select all

.x-autocontainer-form-item, .x-anchor-form-item, .x-vbox-form-item, .x-table-form-item {	width:100%}
Put this code in a css file and call it from startup.html
AwareIM 6.0 - build 2028 / MS SQL Server Express / Windows Server 2012R2
crisg0112
Posts: 395
Joined: Fri Jan 31, 2014 3:45 am
Location: Melbourne, Australia

Re: HTML formatting question

Post by crisg0112 »

RafaMD wrote:The problem is that the parent div of html cell has no specific width.

I solved overwritting the default settings whith this class:

Code: Select all

.x-autocontainer-form-item, .x-anchor-form-item, .x-vbox-form-item, .x-table-form-item {	width:100%}
Put this code in a css file and call it from startup.html
Thanks Rafa, will give that a try as well!
Thanks in advance!

Cris
MSSQL 2008R2, Aware 7 b2146, IE11, , Firefox 35.0.1, Windows 8 Bootstrap theme
Post Reply