...

View Full Version : Little questions



Wing99
05-02-2006, 03:51 PM
hello im just starting out my life as a web master (which i am loving to bits)

but i was wondering about something my instructor doesnt know about.

i am designing a site that is going to have a picture of a taxman handing out cash, the picture will have arms spread out like he was hanging from a cross

I Attach a very rough picture of the site (good ole paint)

i was wondering if i could set the background as an image file, and if so how exactly?

i can get images with the code
<img src="taxman.gif" alt="Taxman picture">


i tried <table bgcolor=c:\website\taxman.gif>
<td bgcolor=c:\website\taxman.gif>

i havnt actually had any formal training in web design ^^so if the language i use isnt quite correct, could you kinda gimme the correct terms, i am trying to pick up bits and peices from other sites my company have made.

if that actually made sense to any1 that has the knowledge could you please do your best to give a "layman term reply" even better than that if its possible the actual line of code would be great.

+++ any good Web design tip would be HUGELY appriecated

Thanks

Stuart

bustamelon
05-02-2006, 04:11 PM
I'm a bit confused - you say you had no formal training, but you're posing a question your instructor doesn't know the answer to? Is the instructor more of a mentor? Because if you're paying this instructor to teach about web design, fire him immediately.

As others will be quick to point out, it's hard for anybody to give specific solutions without some code to work with, so if you have it, post it. And use the CODE buttons to put it in a neat little box.

But your problem is an easy one -- use CSS. Let's say the container or box where your tax man lives is a <DIV> tag. Give that DIV an ID, let's call it taxman. Your html will look like this:


<div id="taxman">
Your content goes here.....
</div>

and that part of your CSS will look like this:


#taxman {
width: 500px; /* or whatever width it takes to fit the whole image in */
height: 400px; /* same with height */
background: url( "taxman.gif" ) no-repeat;
}

Wing99
05-02-2006, 04:22 PM
<title>SFIA Trust Independent School Search</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">


<link rel="Stylesheet" type="text/css" href="style.css">
<!-- #include file="header.htm"-->
<table width="540" border="0" class="subtable">
<tr>
<td align="center">title.<br>

Avoiding Tax liabilities should not be the prime reason for making any investment decision.
However there are now sufficiently strong govenment incentives underpinning tax shelter products for investors to treat tax migration

as an important part of any investments

</tr>
</td>
</table>
<br>

<table width="269" height="100" border="0" align="left" class="subtable" cellpadding="10px" cellspacing="0px">
<tr>
<td>Individual Message
</tr>
</td>
</table>


<table width="269" height="100" border="0" align="" class="subtable" cellpadding="0px" cellspacing="0px">
<tr>
<td>Bussiness Message
</tr>
</td>
</table>
<br>


<table width="540" height="150" border="0" align="" class="subtable" cellpadding="0px" cellspacing="0px">
<tr><td>PICTURE GOES IN RIGHT ABOUT HERE!!!


<table width="169" height="100" border="0" align="left" class="subtable" cellpadding="0px" cellspacing="0px">
<tr>
<td>Active Scheme Report
</tr>
</td>
</table>

<table width="169" height="100" border="0" align="right" class="subtable" cellpadding="0px" cellspacing="0px">
<tr>
<td>Link To Enquire
</tr>
</td>
</table>


</td></tr>






</tr>
</td>


Thats the code im working with, my instructor is my boss (im an apprentice ^^) hes more of a hardware guys with knowledge of Web design but its not his primary knowledge if you know what i mean (he knows enough to get by, might be easier way of saying it)

I marked it where i believe the line of code should live (with PICTURE GOES IN RIGHT ABOUT HERE!!!) but i just dont know the code :)

Thanx

Stuart

VIPStephan
05-02-2006, 04:23 PM
[...] if the language i use isnt quite correct[...]
Well, yeah, you're right with this at least: Your language isn't quite correct. :D
The bgcolor attribute is setting the background color (how surprising!), not a background image. For this there is a background attribute. And also your image path isn't gonna work if you upload the website to a server 'cause there won't be your good ol' c:\ drive. You should put images into an "images" folder and refer to it like this for example: <img src="images/image.gif">.
But as bustamelon mentioned already (while I was typing like hell, trying to be the first :D) you should use CSS - and fire your instructor immediately. :p

And if you're not too familiar with HTML and CSS then just learn it (for example on http://www.w3schools.com or http://htmldog.com). And start doing it correctly from the beginning, meaning to never use tables for layout, only for... well, tables. :)

Wing99
05-02-2006, 04:27 PM
By the way thankyou for replying so quickly

Stuart

VIPStephan
05-02-2006, 04:34 PM
And by the way: "Why Tables For Layout Is Stupid" (http://www.hotdesign.com/seybold/)

Wing99
05-02-2006, 04:39 PM
And by the way: "Why Tables For Layout Is Stupid" (http://www.hotdesign.com/seybold/)

:) Just reading through the FAQs, that and 3wschool are on my list of things to visit (any who says learning to build professional websites is easy, is a better man than i ^^)

thanx

Stuart

bustamelon
05-02-2006, 04:46 PM
Well seeing as how you're on your way already with a table layout, I'll apply the solution to your code, but VIPStephan is right when he suggests getting started on thr right foot and using tables only for their intended purpose, and CSS for layout. Now there are two places where it might be right to put your image. You have nested tables with a class of "subtable". Depending on how your layout works, your image will go either in the TD of the first table, or right in the 2nd table. The code I've added should show up in red -- don't use both, but try them individually and see which one works better for you.


<table width="540" height="150" border="0" align="" class="subtable" cellpadding="0px" cellspacing="0px">
<tr><td id="taxman">PICTURE GOES IN RIGHT ABOUT HERE!!!


<table id="taxman" width="269" height="100" border="0" align="left" class="subtable" cellpadding="10px" cellspacing="0px">
<tr>
<td>Individual Message
</tr>
</td>
</table>

and then your css:


#taxman {
background: url( "/images/taxman.gif" ) no-repeat;
}

VIPStephan
05-02-2006, 05:19 PM
Based on your post(s) I suppose you haven't worked with CSS so much yet so the place where you put the CSS code is in between style tags within the head section of your HTML (for now) - in case you didn't know yet:



<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<head>
<title>blah</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
#taxman {
background: url( "/images/taxman.gif" ) no-repeat;
}
</style>
</head>

<body>
.... etc. etc. ....


(and always use a doctype in your document (on the very top - like in the example))

Wing99
05-03-2006, 11:25 AM
Thanx very very much, ill try those solutions as soon as i can.

TY V Much

Stuart

Wing99
05-03-2006, 11:38 AM
<table width="540" height="150" border="0" align="" class="subtable" cellpadding="0px" cellspacing="0px">
<tr><td id="taxman">PICTURE GOES IN RIGHT ABOUT HERE!!!

this one worked

thanks alot

very very greatful ^^

Stuart



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum