Skip to main content
GameDev.net gamedev.net
🔒 Locked

[web] Help with web code.

Started by SSJCORY Aug 22, 2004 at 9:18 PM 13 replies 1k views
Original Post
SSJCORY
SSJCORY
For some reason my table that i'm using for a top isn't working right in the second cell. I have 2 pictures 1 left side rounded corner 1 right side rounded corner. I'm trying to make the middle one be a background color white so that no matter what the resolution of the window it will stretch accross to meet up with the corner peices. Here's my html. Please help

<html>
<head>
<title>Cory's Page</title>
<style type = "text/css">
td.bannerleft{
background: url(bannerleft.bmp) fixed no-repeat;
}
td.bannerright{
background: url(bannerright.bmp) fixed no-repeat;
}
a:link,a:visited{
background-color:white;
text-color: blue;
text-decoration: none;
}
a:active{
background-color:yellow;
}
</style>
</head>
<body bgcolor = "black">
<table border = "0">
<tr bgcolor>
<td width = "150" height = "100" class = "bannerleft"></td>
<td width = "100% - 300" height = "100" bgcolor = "white"></td>
<td width = "150" height = "100"class = "bannerright"></td>
</tr>
</table>
</body>
</html>


Or is there a better way to do this?
Favorite Quotes:Gandalf: You cannot pass!|Smeagol: We don't need you!|Sloth: Hey you guys!|
Palidine
Palidine
what browser are you using to test with. last time i was a web developer ( ~2 yrs ago ), background images were a big no-no b/c they were broken on a great many browsers.

-me
SSJCORY
SSJCORY
ie newest ver
Favorite Quotes:Gandalf: You cannot pass!|Smeagol: We don't need you!|Sloth: Hey you guys!|
SSJCORY
SSJCORY
How would you suggest doing it then?
EDIT: I could make them foreground images but then i couldn't write over them =/
Favorite Quotes:Gandalf: You cannot pass!|Smeagol: We don't need you!|Sloth: Hey you guys!|
V E C T O R
V E C T O R
  <TABLE BORDER="1" CELLPADDING="0" CELLSPACING="0" WIDTH="100%">    <TR>      <TD WIDTH="20%" STYLE="background-image: url('file:///C:/corner.bmp'); background-repeat: no-repeat"> </TD>      <TD WIDTH="80%" BGCOLOR="#FFFFFF"> </TD>      <TD WIDTH="20%" STYLE="background-image: url('file:///C:/corner.bmp'); background-repeat: no-repeat"> </TD>    </TR>  </TABLE>


I put the CSS within the tag; however, you can define it in the header with a style tag. Also, no spaces when defining attributes. And don't do this: 100% - 300.
The word vector means "carrier" in Latin; it is derived from the Latin verb vehere, which means to carry. (thefreedictionary.com)
V E C T O R
V E C T O R
Quote:
Original post by SSJCORY
EDIT: I could make them foreground images but then i couldn't write over them =/


You could with the div tag and the z-index set to 2. But it usually never really lines up.
The word vector means "carrier" in Latin; it is derived from the Latin verb vehere, which means to carry. (thefreedictionary.com)
SSJCORY
SSJCORY
That doesn't work at all =/ Can i get a hint?

[Edited by - SSJCORY on August 22, 2004 10:54:15 PM]
Favorite Quotes:Gandalf: You cannot pass!|Smeagol: We don't need you!|Sloth: Hey you guys!|
jbadams
jbadams
Quote:

You could with the div tag and the z-index set to 2. But it usually never really lines up.


Layering is BAD kiddies - support for it across different browsers is very patchy.
- Jason Astle-Adams
V E C T O R
V E C T O R
Quote:
Original post by Kazgoroth
Layering is BAD kiddies - support for it across different browsers is very patchy.


This is true and also why table "wizardry" is your best bet.
The word vector means "carrier" in Latin; it is derived from the Latin verb vehere, which means to carry. (thefreedictionary.com)
evolutional
evolutional
The code posted by VECTOR should do the job... I'll also echo his point about not putting spaces between attributes and the equals sign.

To fix your problem, make the table width="100%" and remove the width attribute from the middle cell. It will automatically resize to fit your screen as you've specified widths for the other two columns.

<table border="0" width="100%"><tr><td width="150" height="100" class="bannerleft"></td><td height="100" bgcolor="white"></td><td width="150" height="100" class = "bannerright"></td></tr></table>
SSJCORY
SSJCORY
Is there a way to get rid of the gaps inbetween the columns? I tried doing cellspacing="0" but it only got rid of the space inbetween the second and third columns.
Favorite Quotes:Gandalf: You cannot pass!|Smeagol: We don't need you!|Sloth: Hey you guys!|
evolutional
evolutional
Did you set the cellspacing of the table itself?
SSJCORY
SSJCORY
I fixed it i set cellspacing and cellpadding to 0.
Favorite Quotes:Gandalf: You cannot pass!|Smeagol: We don't need you!|Sloth: Hey you guys!|
Spintwo
Spintwo
Quote:
Original post by SSJCORY
I fixed it i set cellspacing and cellpadding to 0.


Did you make sure to make the border 0 also? If those three properties are 0s, there should be no space between the table entries whatsoever.
SSJCORY
SSJCORY
Yeah i set the border to 0 already =D
Can anyone give me any cool web design tips?
Favorite Quotes:Gandalf: You cannot pass!|Smeagol: We don't need you!|Sloth: Hey you guys!|

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.