stacksos Posted April 20, 2017 Share Posted April 20, 2017 I've been trying to use the custom.css area to perform the CSS tasks needed on my website. I am sure I am entering them in incorrectly. I only need a few tables on the website as I use WordPress for everything else outside of this website. I can do CSS coding for an individual page, but using the custom.css I am not fully understanding it. <style type="text/css"> td{text-align:center; font: rockwell} tr{text-align:center; font: rockwell} table, td, th { border: 1px solid gray } #tst1 {table-layout: auto; display: table;} table {width: 90%; margin: 20px;} table.center {margin-left:auto; margin-right:auto;} </style> I would like this code for ALL my tables within my WHMCS website. 0 Quote Link to comment Share on other sites More sharing options...
bear Posted April 20, 2017 Share Posted April 20, 2017 Your syntax is off in that, for one thing. You're missing the ; at the end of several declarations. What is it doing (or not) when it's used? 0 Quote Link to comment Share on other sites More sharing options...
stacksos Posted April 21, 2017 Author Share Posted April 21, 2017 Your syntax is off in that, for one thing. You're missing the ; at the end of several declarations.What is it doing (or not) when it's used? She works how I want it to work in Notepad++ just fine. Just trying to get the code right in the custom.css file is what is throwing me for a loop. Attached is how I want it to look. WordPress made me forget a lot, and I was still new to CSS when I started WordPress. Now I am trying to get back into CSS. Right now pasting that in the custom.css file is giving me a blank page even when I have data in the file. I delete the code from custom.css and my data shows on the page. New to WHMCS layout and still a newbie in CSS is causing a major headache. Thanks! I tried searching and couldn't find anything with my exact needs. I appreciate the help! 0 Quote Link to comment Share on other sites More sharing options...
bear Posted April 21, 2017 Share Posted April 21, 2017 Silly question, but your custom.css file, did you remove the <style type="text/css"> </style> bits from that code? 0 Quote Link to comment Share on other sites More sharing options...
stacksos Posted April 23, 2017 Author Share Posted April 23, 2017 Silly question, but your custom.css file, did you remove the <style type="text/css"> </style> bits from that code? Yes. Even entertained leaving them in. It's two simple comparison tables so I am going another route. 0 Quote Link to comment Share on other sites More sharing options...
bear Posted April 23, 2017 Share Posted April 23, 2017 If you change your mind, it may be just those missing ";" from the style declarations. If you want to give it another shot I'd be happy to have a look. 0 Quote Link to comment Share on other sites More sharing options...
stacksos Posted April 24, 2017 Author Share Posted April 24, 2017 If you change your mind, it may be just those missing ";" from the style declarations. If you want to give it another shot I'd be happy to have a look. I never throw in the towel. I'd LOVE to use it in the WHMCS theme instead of just linking to a plain HTML page. I have the charts done now I can come back to problem-solving this. Needed to get the charts up so a client could compare them. 0 Quote Link to comment Share on other sites More sharing options...
bear Posted April 24, 2017 Share Posted April 24, 2017 I never throw in the towel. I'd LOVE to use it in the WHMCS theme instead of just linking to a plain HTML page. Ok, then, see if this does what you need. Keep the table ID as #tst1 as in the example. table#tst1 { margin: 20px; border: 1px solid gray; width: 90%; font-family: Rockwell, serif; text-align: center; margin-left:auto; margin-right:auto; } table#tst1 tr td, table#tst1 tr th { border: 1px solid gray; width: 33%; } 0 Quote Link to comment Share on other sites More sharing options...
stacksos Posted April 26, 2017 Author Share Posted April 26, 2017 Unfortunately, it did nothing. I was able to get it to put a border doing the following code. .table, th, td { border: 1px solid black; } - - - Updated - - - Wish it had an edit button. Hate making multiple posts. I just need the table to center the text in each cell. Everything else I can do manually on each individual table. 0 Quote Link to comment Share on other sites More sharing options...
bear Posted April 26, 2017 Share Posted April 26, 2017 Did nothing? In my test it replicated your table exactly when the table had an ID of #tst1. How weird. 0 Quote Link to comment Share on other sites More sharing options...
stacksos Posted May 6, 2017 Author Share Posted May 6, 2017 Did nothing? In my test it replicated your table exactly when the table had an ID of #tst1.How weird. I've noticed a delay in the refreshing. Text is immediate, but when I do CSS I have to close the browser, resign in, etc. Then it is showing. - - - Updated - - - Wish CSS came to me like automotive and electrical. We wouldn't be having this issue. LOL 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.