PDA

View Full Version : can someone help please



EmotionComplex
29-07-2004, 02:16 AM
probobly a very simplistic thing i need to know but i know very little about the html side of sites.

basically i need a page with a horizontal line down the midle and the top
section to be white and the bottom section to be black....i told you it was simple :oops:

schlongfingers
29-07-2004, 03:09 PM
probobly a very simplistic thing i need to know but i know very little about the html side of sites.

basically i need a page with a horizontal line down the midle and the top
section to be white and the bottom section to be black....i told you it was simple :oops:

this should do it

<html>
<head></head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" border="0">
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
<tr><td height="50%" bgcolor="#FFFFFF"> </td></tr>
<tr><td height="1" bgcolor="#999999"><img src="images/spacer.gif" height="1" /></td></tr>
<tr><td height="50%" bgcolor="#000000"> </td></tr>
</table>
</body>
</html>

MangaFish
29-07-2004, 10:33 PM
not sure why you;ve put the middle cell in ?

EmotionComplex
29-07-2004, 11:44 PM
thanks man :)

ill give it a go

schlongfingers
03-08-2004, 02:04 PM
No worries, hope it's useful.

@ Mangafish - I put the middle cell on to emulate a rule because of the padding on the <hr /> tag - it was important to remove it in this case because otherwise the rule sits slightly inside thhe white bg cell. Could have got around this with css, but it seemed simpler in this case to add an empty cell.

MangaFish
03-08-2004, 09:06 PM
you shouldnt need a stylesheet to change cell dimentions.

it was more the image in the middle cell i couldnt understand the perpose of as your assuming that there will be the image "images/spacer.gif" on EmotionComplex's site

schlongfingers
04-08-2004, 03:06 PM
you shouldnt need a stylesheet to change cell dimentions.

it was more the image in the middle cell i couldnt understand the perpose of as your assuming that there will be the image "images/spacer.gif" on EmotionComplex's site

No you misunderstand me, not to change cell dimensions - the <hr /> tag comes with padding as standard, but this can be removed using css (although not across all browsers) - I simulated a rule using a 1 pixel high cell to remove padding from the rule therefore giving a clean divide between top and bottom sections. The image is there to ensure the cell loads at exactly one pixel high, if you leave the td tag complately empty it will display incorrectly in some browsers.

Whooops, EmpotionComplex, you need to put a transparent .gif image called spacer.gif inside a folder called images (the images folder should be within the same directory as the file created using the code above.

MangaFish
04-08-2004, 06:39 PM
ahhh cool. nice work mate

schlongfingers
11-08-2004, 12:46 PM
ahhh cool. nice work mate

Nae worries! Hopefully it was of some use

278d7e64a374de26f==