Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expected CSS styles not working #112

Closed
siddharthaReddy opened this issue Dec 20, 2016 · 19 comments
Closed

Expected CSS styles not working #112

siddharthaReddy opened this issue Dec 20, 2016 · 19 comments

Comments

@siddharthaReddy
Copy link

Our current application has the requirement to be responsive, so we are using bootstrap 3. App is still in initial stages and all the styles are applied only using bootstrap classes.

Smart-table that has been included using npm install doesn't have the actual/expected styles from demos.

smart-table-styles

The labels and text outside of table are of font-size 14 px, where as text inside tables is getting computed to 8.75px. Also, table's border-top doesn't appear.

I have tried adding classes to table and then have those classes define styles in module and component based css files but still doesn't apply.

Is there a way to customize the styles for smart-tables ?

Thanks in advance.

@DickRiversDuGettho
Copy link

i have the same issue, i don't understand how to apply styles, please, Any explanations.

@vdoolla
Copy link

vdoolla commented Jan 6, 2017

I am also having the same problem while using this smart table with Bootstrap 3 can some please throw light for us to customize the css in order to increase the font of table content

@neo4u
Copy link

neo4u commented Feb 7, 2017

Any update on this? Were you able to make any CSS customizations?

@stefanofalasca
Copy link

Me too same problem

@neo4u
Copy link

neo4u commented Feb 22, 2017

@stefanofalasca : This was a false alarm for me. I hadn't imported the file to modify the theme correctly.

@vamsyvirureddy
Copy link

mee too same problem

@chaouiy
Copy link

chaouiy commented Feb 28, 2017

problem source : default ng2-smart-table style is erasing any post defined css rules. I am forking the repo to comment css file

@vdoolla
Copy link

vdoolla commented Mar 2, 2017

@youneschaoui - Please let us know once you commit the code to repo. Thank you for finding the root cause and willing to fork the fix to the repo.

@Akshaymisal5
Copy link
Contributor

me too same problem

@mat-codehaus
Copy link

mat-codehaus commented Apr 5, 2017

The issue is most likely that the tr/th style specifies 0.875rem for the font size and Bootstrap 3 by default has a small base font, maybe 10px?

0.875rem means that the font sizes for the table rows and headers with be 0.875x the size of the base/root font - which is small in Bootstrap.

So you can either customise/modify your Bootstrap configuration to a bigger base font size or update the styles for the table rows/headers to be something bigger than 0.875rem.

However, it would be good to be able to override the tr/th values as part of the components configuration.

@a4amitava
Copy link

Me too have the same issue . any update or work around please ?

@abhishek3999
Copy link

I have also same issue.I am not able to apply extra css to smart table.
I am using @angular/material/prebuilt-themes/indigo-pink.css.
so table is not showing with neat border and aligned.
please answer asap.

@srinikoganti
Copy link

Having same problem. Can't apply bootstrap classes for the table. Any solution ?

@DickRiversDuGettho
Copy link

DickRiversDuGettho commented Jul 12, 2017 via email

@abhishek3999
Copy link

the table is designed by using bootstrap.If you have to use or apply css externally for the table then
eg> td{backgroundColor:pink}
th{ font:bold;
} use like this way
Thanks

@davidmartinezros
Copy link

Hi!

I migrate the version of angular from 2 to 4 for use the new version of the component.

In my case, the ng2-smart-table component, version ^1.2.2, doesn't show the cell style border.

I have to define any style for showing? Or the styles of the tables changes from the version 0.6.0?

Thanks in advanced,

David

@abhishek3999
Copy link

abhishek3999 commented Sep 30, 2017 via email

@ankypant
Copy link

use below configuration in the setting object

attr: {
class: 'table table-bordered'
},

and

:host /deep/ ng2-smart-table {
font-size: 16px;
}

eg .
settings = {
columns: {
id: {
title: 'ID'
},
name: {
title: 'Full Name'
},
username: {
title: 'User Name'
},
email: {
title: 'Email'
}
},
attr: {
class: 'table table-bordered'
}
};

@DarioN1
Copy link

DarioN1 commented Feb 18, 2020

I have the same problem, do you have any updates ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests