Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,471
There are 1467 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     HTML/XHTML/DHTML/CSS :

** Please help **

Thread title: ** Please help **
Closed Thread    
    Thread tools Search this thread Display Modes  
07-19-2007, 06:40 PM
#1
Charllie is offline Charllie
Status: Sin Binner
Join date: Nov 2006
Location:
Expertise:
Software:
 
Posts: 634
iTrader: 6 / 88%
 

Charllie is on a distinguished road

  Old  ** Please help **

Hey guys, unfortunately i dont have any kind of html editing software, so i just use notepad. and im not the most experienced coder =P lol, i know nothing.

But i've been checking out a few sites and i just want to get an image on a page, center it, and have a background image.. But this code doesn't want to ****ing work!! and sorry for my french, but its really doing my head in.

<html>
<head>
<title>mmm</title>
</head>

<style type="text/css">

body
{
background-image:
url('imgs/background.jpg');
background-repeat: repeat-x;
margin:0
}

</style>

<body>

<a href="cpanel.htm">
<img border="0" src="imgs/main.jpg" align=center>
</a>

</body>
</html>

---------------

I have a folder - imgs (with background.jpg in)

Please, if anyone is out there?

Thanks.

07-19-2007, 07:03 PM
#2
Seb is offline Seb
Seb's Avatar
Status: Watermelon Man
Join date: Nov 2006
Location: London
Expertise:
Software:
 
Posts: 3,312
iTrader: 36 / 100%
 

Seb is on a distinguished road

  Old

What is wrong? Do you have a live preview?

07-19-2007, 07:06 PM
#3
Seb is offline Seb
Seb's Avatar
Status: Watermelon Man
Join date: Nov 2006
Location: London
Expertise:
Software:
 
Posts: 3,312
iTrader: 36 / 100%
 

Seb is on a distinguished road

  Old

Try this:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>mmm</title>

<style type="text/css">
<!--
body
{
background-image: url(imgs/background.jpg);
background-repeat: repeat-x;
margin: 0;
}

-->
</style>

</head>

<body>
<div align="center">
<a href="cpanel.htm">
<img border="0" src="imgs/main.jpg" />
</a>
</div>

</body>
</html>

07-19-2007, 07:08 PM
#4
Seb is offline Seb
Seb's Avatar
Status: Watermelon Man
Join date: Nov 2006
Location: London
Expertise:
Software:
 
Posts: 3,312
iTrader: 36 / 100%
 

Seb is on a distinguished road

  Old

There were several errors, some which I noticed after, so try again cause I edited.

07-19-2007, 07:29 PM
#5
Charllie is offline Charllie
Status: Sin Binner
Join date: Nov 2006
Location:
Expertise:
Software:
 
Posts: 634
iTrader: 6 / 88%
 

Charllie is on a distinguished road

  Old

Thank you! o so! f***ing much!

07-20-2007, 06:19 AM
#6
insub2 is offline insub2
Status: Member
Join date: Jun 2007
Location:
Expertise:
Software:
 
Posts: 136
iTrader: 1 / 100%
 

insub2 is on a distinguished road

Send a message via AIM to insub2

  Old

Use this:

Code:
<html>
<head>
<title>mmm</title>
</head>

<style type="text/css">

body
{
background: url('imgs/background.jpg') repeat-x top center; /*for more info: http://www.w3schools.com/css/css_background.asp */
margin:0;
text-align:center; /*this should put the <img> in the center of your page */
}

img {
border:0; /*put the border=0 in the css to seperate your style from your content! */
}

</style>

<body>

<a href="cpanel.htm">
<img src="imgs/main.jpg">
</a>

</body>
</html>

07-20-2007, 06:26 PM
#7
Charllie is offline Charllie
Status: Sin Binner
Join date: Nov 2006
Location:
Expertise:
Software:
 
Posts: 634
iTrader: 6 / 88%
 

Charllie is on a distinguished road

  Old

Its been done, as seb stated.

07-20-2007, 08:04 PM
#8
insub2 is offline insub2
Status: Member
Join date: Jun 2007
Location:
Expertise:
Software:
 
Posts: 136
iTrader: 1 / 100%
 

insub2 is on a distinguished road

Send a message via AIM to insub2

  Old

my way has cleaner, semantic code which utilizes the advantages of CSS.

but if it's only one page it doesn't matter much.

whatever.

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed