Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | Table CSS (Image/Background) Help....

You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > Internet Discussion
Register FAQ Community Calendar

Table CSS (Image/Background) Help....
Reply
 
Thread Tools
Old 25-10-2009, 17:57   #1
JediMaster
Inactive
 
JediMaster's Avatar
 
Join Date: Jan 2004
Location: Swansea
Posts: 1,376
JediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these parts
Question Table CSS (Image/Background) Help....

I have been trying to get a Table CSS to work, I thought it would be EASY lol.

I have 1 Table (1 Cell) 900 wide. I want to have a background image (thats 900 wide) repeated down the table.

But also I want to position a Image at the TOP of the table thats 900 wide also. These 2x images will be the background of the table.

I will then add Text on top of the image (inside the Cell). So the images have to be Backgrounds not adding IMG tag & cant add text over it.

Cheers
JediMaster is offline   Reply With Quote
Advertisement
Old 25-10-2009, 20:38   #2
Damien
Remoaner
Cable Forum Team
 
Damien's Avatar
 
Join Date: Mar 2004
Posts: 32,912
Damien has a lot of silver blingDamien has a lot of silver blingDamien has a lot of silver blingDamien has a lot of silver blingDamien has a lot of silver bling
Damien has a lot of silver blingDamien has a lot of silver blingDamien has a lot of silver blingDamien has a lot of silver blingDamien has a lot of silver blingDamien has a lot of silver blingDamien has a lot of silver blingDamien has a lot of silver blingDamien has a lot of silver blingDamien has a lot of silver blingDamien has a lot of silver blingDamien has a lot of silver blingDamien has a lot of silver bling
Re: Table CSS (Image/Background) Help....

Do you have some existing CSS that's not working or do you need an idea on how to do it?
Damien is offline   Reply With Quote
Old 25-10-2009, 22:35   #3
webcrawler2050
Inactive
 
Join Date: Feb 2008
Location: Swindon
Services: TiVo 110MB BB Phone Line
Posts: 3,087
webcrawler2050 has reached the bronze age
webcrawler2050 has reached the bronze agewebcrawler2050 has reached the bronze agewebcrawler2050 has reached the bronze agewebcrawler2050 has reached the bronze agewebcrawler2050 has reached the bronze agewebcrawler2050 has reached the bronze agewebcrawler2050 has reached the bronze age
Send a message via MSN to webcrawler2050
Re: Table CSS (Image/Background) Help....

Quote:
Originally Posted by JediMaster View Post
I have been trying to get a Table CSS to work, I thought it would be EASY lol.

I have 1 Table (1 Cell) 900 wide. I want to have a background image (thats 900 wide) repeated down the table.

But also I want to position a Image at the TOP of the table thats 900 wide also. These 2x images will be the background of the table.

I will then add Text on top of the image (inside the Cell). So the images have to be Backgrounds not adding IMG tag & cant add text over it.

Cheers
Is it absolutly necessary to use tables?
webcrawler2050 is offline   Reply With Quote
Old 25-10-2009, 23:33   #4
punky
Inactive
 
Join Date: Jun 2003
Age: 44
Posts: 14,750
punky has a golden aurapunky has a golden aura
punky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aura
Re: Table CSS (Image/Background) Help....

Right I think I have it now. You want a background at the back, and image on top of that and then a table on top of that?

If you use <div> with absolute positioning and z-index you can. z-index says when things are on top of each other which is at the back and which is at the front. Default is 0, positive is coming out of the screen towards the user, minus is going back into the screen.

Probably are easier ways but something like this:

Code:
<html>
	<body>
		
		
		<!-- Your normal code here -->
	
	
	<!-- This div just wraps everything into one group -->
	<div style="position:absolute;">
		
			<!-- This is the background and is at the back. Z-index: 0 -->
			<div style="position:absolute;left:0px;top:0px;z-index:0;width:900px;height:300px;background-image:url('test.gif');">
			</div>
			
			<!-- This contains the image. Z-index: 1 -->
			<div style="position:absolute;left:0px;top:0px;z-index:1;width:900px;height:300px;">
				<img style="position:absolute;z-index:0" src="test2.gif" />
			</div>
			
			<!-- This contains the table. Z-index:2 -->
			<div style="position:absolute;left:0px;top:0px;z-index:2;width:900px;height:300px;">
			<table style="width:300px;height:300px;">
				<tr>
					<td>1111111</td><td>222222</td><td>3333333</td>
				</tr>
							<tr>
					<td>444444</td><td>5555555</td><td>6666666</td>
				</tr>
							<tr>
					<td>7777777</td><td>8888888</td><td>99999999</td>
				</tr>
			</table>
			</div>
	</div>
	</body>
</html>
punky is offline   Reply With Quote
Old 26-10-2009, 11:26   #5
JediMaster
Inactive
 
JediMaster's Avatar
 
Join Date: Jan 2004
Location: Swansea
Posts: 1,376
JediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these parts
Re: Table CSS (Image/Background) Help....

Quote:
Originally Posted by webcrawler2050 View Post
Is it absolutly necessary to use tables?
No not really. I just used Tables to test stuff.


Quote:
Originally Posted by punky View Post
Right I think I have it now. You want a background at the back, and image on top of that and then a table on top of that?
Yes thats about it I have uploaded a DEMO at http://www.suziperry.tv/test/css.htm of what your code is. Also @ http://www.suziperry.tv/test/ is what I want it to look like

Your CSS had Height tag, I dont know how high each page would be, so would prefer it to not have height. Also needs to be Centre.

Only other way I can think of, is to make my Top Image 900x390_Top.jpg 1000 pixel High (or larger) then just use 1 image (no need to overlay 2x

---------- Post added at 10:26 ---------- Previous post was at 09:15 ----------

Just worked out a way with DIV Tags & CSS. Not the Best way maybe, but it does what I want. http://www.suziperry.tv/test/box.htm

Code:
a.box {
    padding-left: 3px;
    font-weight: bold;
}
div.moduletable h3, div.box h3, div.box-dark h3 {
  margin: 0;
  font-weight: bold;
  font-family: Verdana, Helvetica, sans-serif;
  font-size: 1.0em;
  margin-bottom: 5px;
  padding-left: 0px;
}

div.box {
  width: 900px;
  background: url(BG_100.jpg) repeat-y;
  margin-bottom: 2px;
}

div.box div {
  background: url(BG_Bottom.jpg) bottom left no-repeat;
}

div.box div div {
  background: url(900x390_Top.jpg) top left no-repeat;
  padding: 7px 3px 7px 2px;
}

div.box div div div {
  background: none;
  padding: 0;
  width: auto !important;
  width: 100%;
}

a.box {
    padding-left: 1px;
    font-weight: bold;
}
div.module2 table h3, div.box2 h3, div.box2-dark h3 {
  margin: 0;
  font-weight: bold;
  font-family: Verdana, Helvetica, sans-serif;
  font-size: 1.0em;
  margin-bottom: 5px;
  padding-left: 0px;
}
JediMaster is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 19:21.


Server: osmium.zmnt.uk
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum