Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to apply CSS styling to AUI RESTful table columns

Holger Schimanski
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 13, 2016

I want to add some CSS style to my AUI RESTful table e.g. column width.

How can I do that? How can I add styling or CSS classes to a AUI RESTful table?

Any idea welcome!
Holger

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Aleks Yenin (Polontech)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 14, 2016
<style>
	#project-config-versions-table td {
		background: yellow;
	}
</style>
 
<table id="project-config-versions-table"></table>

 

In this case all cells in your table would have yellow background color. This way you can specify all styles you need.

Holger Schimanski
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 14, 2016

I want to style a certain column, but that column has no id or name given. How to set e.g. width for column which contains an input field which id is "name"?

Aleks Yenin (Polontech)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 14, 2016

If You know index of column - you can use this

#project-config-versions-table tr td:nth-child(2) {
  	background: green;
}

See more how it works here: 

https://jsfiddle.net/ogepnktf/

Holger Schimanski
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 15, 2016

Yes, td:nth-child(2) works fine. Thanks a lot!

0 votes
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 14, 2016

Page on which you have RESTFULL table should include your custom webresource which includes CSS file where you define custom styles.

TAGS
AUG Leaders

Atlassian Community Events