News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

styling the .bbc_table with border

Started by spiros, April 17, 2017, 03:27:39 AM

Previous topic - Next topic

spiros

I am trying to apply a style with single border around every cell like this:

https://www.w3schools.com/css/tryit.asp?filename=trycss_table_padding

But I can't make it. This is my css

.bbc_table{font:inherit;color:inherit}.bbc_table td{font:inherit;color:inherit;vertical-align:top}

Example table: https://www.translatum.gr/forum/index.php?topic=459457.0
Css source: https://www.translatum.gr/forum/Themes/citiez_20a/css/index.css

Gluz

In .bbc_table add:
border-collapse:collapse;

And in .bbc_table td add:
border: 1px solid #888;
padding: 15px;



And change the width and color of the border as you want, and also the padding, that could be 0px 15px for 0 in top and bottom and 15 at the sides only.



spiros

Thanks, but that does not give me lines between each cell as in the w3schools example.

Linkjay

Try using the browser code editor and doing the changes from the browser, making sure the code works where you want it to. After that, apply the changes in the CSS file. It might not be showing right away due to client and or server caching.
I play games in my free time and volunteer my knowledge and support to the gaming communities of the internet.

You can contact me by these methods:
Use my Contact Script • PM me here • Add me on Steam

Gluz

You only have 1 row and 2 columns, and that is 2 cells, the code in that post is something like this:
[table][tr][td]
[b]Action[/b]
Insert a new line within a cell
Enable editing within a cell
Add a comment to a cell
Open Print Preview
Fill selected cells with an entry you typed in one cell
Fill data down or to the right through selected cells
Create a name
Insert the current date or time
Create a chart from a range of data
Toggle the display of formulas
[/td][td]
[b]Shortcut[/b]
[Alt] [Enter]
[F2]
[Shift] [F2]
[Ctrl] [F2]
[Ctrl] [Enter]
[Ctrl] D or [Ctrl ] R
[Ctrl [F3]
Ctrl] and ; (semicolon) or Ctrl and : (colon)
[F11]
[Ctrl] ~
[/td][/tr][/table]


Quote

Action
Insert a new line within a cell
Enable editing within a cell
Add a comment to a cell
Open Print Preview
Fill selected cells with an entry you typed in one cell
Fill data down or to the right through selected cells
Create a name
Insert the current date or time
Create a chart from a range of data
Toggle the display of formulas

Shortcut
[Alt] [Enter]
[F2]
[Shift] [F2]
[Ctrl] [F2]
[Ctrl] [Enter]
[Ctrl] D or [Ctrl ] R
[Ctrl [F3]
Ctrl] and ; (semicolon) or Ctrl and : (colon)
[F11]
[Ctrl] ~



If you want each element in a cell, then you need to put the proper BBCode.

spiros

#5
Gluz, indeed, you are correct! It seems it would be too complicated to add correct code for every single line in tables with many lines. Maybe some sort of Excel template where one could paste the text columns and by merging them have the right code ready?

Edit: I found these
http://theenemy.dk/table/
https://jsfiddle.net/mvo50z10/11/

Advertisement: