having trouble trying to remember how to center this Icon in a Grid cell
.greenbutton{
color: #00ad76 !important;
font-weight: bold !important;
}
Then, in the Styles definition, there is this:
The Style setting seems to make no difference to the Icon. (ie. its not aligned right, its not 14pt, not white backgr)
Even setting "text-align: center" in the CSS didn't center the Icon in the column. Which makes sense, as the FA Icon is just text and the text area isn't the entire column width... the FA Icon is displayed using ::before.
V8.1 bld 2476
PS _ The forum software screwed me 1 times in the making of this post
In the Attribute definition, there is an Icon Rule to determine 1 of 4 icons.
Sample CSS for the icon color:Trouble with Align Icon in center of grid cell
Trouble with Align Icon in center of grid cell
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: Trouble with Align Icon in center of grid cell
I think what you want is to select the grid, click the Widget property, select the column you want to center, click Edit, select Column Header, and set the Alignment combo box to Center.
v8.1 on Windows 10 / MySQL 5.6 (local), v8.1 on Windows Server 2016 / MySQL 5.6 (server)
Re: Trouble with Align Icon in center of grid cell
Jon, that ONLY sets the Column Header (like it says) to be centered. NOT the data under it.
The data should be set (or overridden) by this: but when setting the grid display to "Icon Only", the checkbox "Use style defined in the attr...." is dimmed.
Maybe thats a bug?
Weird thing is, I have an older-created Query (from a prev. build) in another BO that has a similar YesNo field, and I have a simple Icon rule and the Checkmark appears centered in its grid, even though I can find NO WHERE any setting to make it centered. The same "Icon Only" setting in the Grid fields. The same dimmed checkbox in the Edit dialog for the column. The centering can't come from the CSS of the ICON.
Aware has already output the CELL info and it says
element.style {
text-align: left;
white-space: nowrap;
}
So the ICON, regardless of it requesting CENTER, is going to be in the LEFT of the cell, which is whats happening.
On the GRID that DIsplays correctly, that cell says:
element.style {
text-align: center;
white-space: nowrap;
}
The data should be set (or overridden) by this: but when setting the grid display to "Icon Only", the checkbox "Use style defined in the attr...." is dimmed.
Maybe thats a bug?
Weird thing is, I have an older-created Query (from a prev. build) in another BO that has a similar YesNo field, and I have a simple Icon rule and the Checkmark appears centered in its grid, even though I can find NO WHERE any setting to make it centered. The same "Icon Only" setting in the Grid fields. The same dimmed checkbox in the Edit dialog for the column. The centering can't come from the CSS of the ICON.
Aware has already output the CELL info and it says
element.style {
text-align: left;
white-space: nowrap;
}
So the ICON, regardless of it requesting CENTER, is going to be in the LEFT of the cell, which is whats happening.
On the GRID that DIsplays correctly, that cell says:
element.style {
text-align: center;
white-space: nowrap;
}
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
-
- Posts: 2399
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Re: Trouble with Align Icon in center of grid cell
It is a long shot but have you tried adding...
text-align: center !important;
to the greenbutton class
text-align: center !important;
to the greenbutton class
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Re: Trouble with Align Icon in center of grid cell
Mark, this is what I was trying to say before.
The TD is planty wide (the column width), and THAT element is text-align: left; Adding CENTER to the Icon actually DOES center it - only in its tiny world of 1em/the width of the character.
The TD is planty wide (the column width), and THAT element is text-align: left; Adding CENTER to the Icon actually DOES center it - only in its tiny world of 1em/the width of the character.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
-
- Posts: 2399
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Re: Trouble with Align Icon in center of grid cell
add this to the greenbutton class....
margin-left: 10px;
margin-left: 10px;
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....