Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display text over 2 cells?

I have a table with 1 row and two cells. Each cell has its own background image. I need to be able to display some text that will be centered in relation to the entire table, meaning that it will appear to be displayed over both table cells.

like this:

enter image description here

Or ideally:

enter image description here

like image 428
Maysam Avatar asked Jan 18 '14 21:01

Maysam


Video Answer


1 Answers

You can use Colspan / Rowspan to create a cell that spans over multiple rows / multiple columns. But it will be a single cell with a single background image as well.

Take a look at this example 'http://www.angelfire.com/fl5/html-tutorial/tables/colspan.htm'

EDIT: You added a new example that clearly shows that colspan will not solve the problem:

Take a look at the answers to this question Invert CSS font-color depending on background-color It includes code for a similar solution using DIV elements positioned ontop of each other

like image 140
odedsh Avatar answered Sep 19 '22 05:09

odedsh