PDA

View Full Version : HTML and CSS


.: Anna :.
21-07-06, 02:37 PM
Can anyone see a reason why this page is not displaying properly? I will put the source code below... It is supposed to hav a background image, towards the left which I did with CSS and was working okay, then it is supposed to have a table towards the right which I did in HTML. It was okay but then I tried 2 position the table bc I did not want it right alligned the whole way into the corner, so I did that then it is just not displaying properly.
I have tried it on two different webspaces and the weird thing, its not even displaying the same on them both :S
On the first, it was displaying only the table and no bg pic, and the 2nd it was displaying only the bg pic but no table? :confused: I know some ppl do computing for ur degree so surely u will be able to help me?
I am a bit confused bc surely a table is a very simple thing, how can it be causing me these problems :S

<title>.:Rufaida:.</title>
<style TYPE="text/css">
<!--
A {text-decoration: none}


A {cursor: crosshair}

A:link { text-decoration: none}

A:active { text-decoration: none}

A:visited { text-decoration: none}

A:hover {text-transform: none; text-decoration: bold; color: "#000000"; background-color: "#ffffff"}

A.nt { color: "#000000" }
A.nt:link { color: "#000000" }
A.nt:active { color: "#000000" }
A.nt:visited { color: "#000000" }
A.nt:hover { color: "#000000"; background-color: transparent }
TD {background-color: "#"}
TD.plain {background-color: "#000000"}
BODY { background: url(topgraphic1.png);background-position: 80px 60px; background-repeat: no-repeat; #ffffff
no-repeat ; scrollbar-base-color: "#FFFFFF" }

.entry { margin-left: 2px; margin-right: 2px ; margin-top: 2px; margin-bottom: 2px; height : 273px ; width : 333px ; overflow : auto ; }
//-->
<body></body>
</head>

<body link="#000000" vlink="#000000" alink="#000000"
topmargin="5" leftmargin="5" bottommargin="5" rightmargin="20" marginwidth="1" marginheight="1">

<p align="center"><br>
</p>
<div align="center">

<table border="0" cellpadding="0" cellspacing="0" width="39%"
bgcolor="#394391" style="border: 1 solid #000000; position: absolute; left: 610px; top: 80px; height: 650px; width: 350px; padding: 1px;" > <tr>
<td>&nbsp; </td>
</tr>
<tr>
<td valign="top" colspan="8"><font color="#FFFFFF">Main Body of Intro Text Here</font><p></body>
</html>

Ibn Khattab
21-07-06, 03:58 PM
i seriosuly dont know sowwie

sajid
21-07-06, 04:30 PM
u got invalid CSS tags i think..

Copy and paste the CSS file and link it

uve also missed out the starting HTML Tag and also head tag

.: Anna :.
21-07-06, 04:32 PM
Sajid cn u plz copy what I have, but just put those corrections into it? ie so that I cn paste what you wrote, and it will work? (insha allah)

MMS
21-07-06, 04:34 PM
try this

<html>
<head>
<title>.:Rufaida:.</title>
<style TYPE="text/css">
<!--

BODY { background-image: url(topgraphic1.png); background-position: 80px 60px; background-repeat: no-repeat; scrollbar-base-color: "#FFFFFF" }

//-->
</style>
</head>

<body
topmargin="5" leftmargin="5" bottommargin="5" rightmargin="20" marginwidth="1" marginheight="1">

<p align="center"><br>
</p>
<div align="center">

<table border="0" cellpadding="0" cellspacing="0" width="39%"
bgcolor="#394391" style="border: 1 solid #000000; position: absolute; left: 610px; top: 80px; height: 650px; width: 350px; padding: 1px;" > <tr>
<td>&nbsp; </td>
</tr>
<tr>
<td valign="top" colspan="8"><font color="#FFFFFF">Main Body of Intro Text Here</font><p></body>
</html>

banglabhai
21-07-06, 05:26 PM
try this

<html>
<head>
<title>.:Rufaida:.</title>
<style TYPE="text/css">
<!--

BODY { background-image: url(topgraphic1.png); background-position: 80px 60px; background-repeat: no-repeat; scrollbar-base-color: "#FFFFFF" }

//-->
</style>
</head>

<body
topmargin="5" leftmargin="5" bottommargin="5" rightmargin="20" marginwidth="1" marginheight="1">

<p align="center"><br>
</p>
<div align="center">

<table border="0" cellpadding="0" cellspacing="0" width="39%"
bgcolor="#394391" style="border: 1 solid #000000; position: absolute; left: 610px; top: 80px; height: 650px; width: 350px; padding: 1px;" > <tr>
<td>&nbsp; </td>
</tr>
<tr>
<td valign="top" colspan="8"><font color="#FFFFFF">Main Body of Intro Text Here</font><p></body>
</html>

very close :D ... you forgot to close the </td></table> :)

<title>.:Rufaida:.</title>
<style TYPE="text/css">
<!--
A {text-decoration: none}


A {cursor: crosshair}

A:link { text-decoration: none}

A:active { text-decoration: none}

A:visited { text-decoration: none}

A:hover {text-transform: none; text-decoration: bold; color: "#000000"; background-color: "#ffffff"}

A.nt { color: "#000000" }
A.nt:link { color: "#000000" }
A.nt:active { color: "#000000" }
A.nt:visited { color: "#000000" }
A.nt:hover { color: "#000000"; background-color: transparent }
TD {background-color: "#"}
TD.plain {background-color: "#000000"}
BODY { background: url(topgraphic1.png);background-position: 80px 60px; background-repeat: no-repeat; #ffffff
no-repeat ; scrollbar-base-color: "#FFFFFF" }

.entry { margin-left: 2px; margin-right: 2px ; margin-top: 2px; margin-bottom: 2px; height : 273px ; width : 333px ; overflow : auto ; }
//-->
</style>

<body link="#000000" vlink="#000000" alink="#000000"
topmargin="5" leftmargin="5" bottommargin="5" rightmargin="20" marginwidth="1" marginheight="1">

<p align="center"><br>
</p>
<div align="center">

<table border="0" cellpadding="0" cellspacing="0" width="39%"
bgcolor="#394391" style="border: 1 solid #000000; position: absolute; left: 610px; top: 80px; height: 650px; width: 350px; padding: 1px;" > <tr>
<td>&nbsp; </td>
</tr>
<tr>
<td valign="top" colspan="8"><font color="#FFFFFF">Main Body of Intro Text Here</font><p>
</td>
</table>
</body>
</html>

.: Anna :.
21-07-06, 06:33 PM
Jazakallah khayr all of u. I will try it , insha allah it fixes the problem :D