HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Top Banner - CSS or Table???
Post new topic   Reply to topic    HTML Help Forum Index -> CSS
View previous topic :: View next topic  
Author Message
erski



Joined: 23 Jul 2006
Posts: 10

PostPosted: Sat Jul 29, 2006 4:06 am     Top Banner - CSS or Table??? Reply with quote

This is a VERY basic question.

I want to make a banner with a backround image and links. Is my best bet to put a style sheet at the top or a table w/ the backround image in it???

I know this question seems dumb but I am just learning this.
camoman666



Joined: 24 Jun 2006
Posts: 373
Location: Fort Walton Beach, FL, USA

PostPosted: Sat Jul 29, 2006 7:11 am     Reply with quote

I would use CSS.[/code]
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8749
Location: Castle Pines North, CO USA

PostPosted: Sat Jul 29, 2006 7:20 am     Reply with quote

It really depends. What will the rest of the page use - divides or tables? If tables, then just use tables for everything.

Usiing divides can be tricky but once you master them, you will learn to love them.

_________________
Corey
Loud Info | Loud Worx | Merchant Account Blog
erski



Joined: 23 Jul 2006
Posts: 10

PostPosted: Sat Jul 29, 2006 9:16 am     Reply with quote

Tables. At this point divides are beyond me. If I use a table for the banner, will I lose the ability to make changes to font, content, etc. in one central document, and have those changes apply to the banner on all pages of the site?
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8749
Location: Castle Pines North, CO USA

PostPosted: Sat Jul 29, 2006 2:20 pm     Reply with quote

Your question is pretty diverse. You say you want CSS, which usually means divides to a lot or people.

But you are using tables. And you can apply styles (internal, external, or inline) to divided and / or tables.

Some people still use tables to help layout a website. A lot more rely on divides.

CSS can still work on colors, (background) images, font styles / sizes, etc on tables and divides.

_________________
Corey
Loud Info | Loud Worx | Merchant Account Blog
erski



Joined: 23 Jul 2006
Posts: 10

PostPosted: Sun Jul 30, 2006 4:59 am     Reply with quote

Divides (got it) (obviously, I'm really just learning this). O.K. so my problem is, I would prefer to use a style sheet, but I cannot figure out how to link the following backround image into this very basic table. I know the code below is poor semantics, but, I used <h> and </h1> to "target my style sheet, which is the backround image.

I cant figue out another way to target that backround w/o using <h1> and table backround img src= isn't working either
Code:

<html>
<head>
<title>Practive document></title>
<LINK REL="Stylesheet" TYPE=text/css" HREF="http://www.geocities.com/worldskiingtravel/stylesheet.css">
</head>
<body>
<H1>
<table border="0" cellspacing="0" cellpadding="0" width="950">
   <tr>
      <td height="25" width="240" valign="top"></td>
      <td height="25" width="100" valign="top">
      <a href="World_Skiing_Travel.html">Home</a> </td>
      <td height="25" width="100" valign="top"><a href="Image.html">Image</a>
      </td>
      <td height="25" width="100" valign="top"><a href="practice.html">Practice</a>
      </td>
      <td height="25" width="100" valign="top"><a href="#Bottom">Bottom</a>
      </td>
   </tr>
</table>
<br>
Travel for Life <br>
<br>
</h1>
<br>
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8749
Location: Castle Pines North, CO USA

PostPosted: Sun Jul 30, 2006 5:46 am     Reply with quote

Your semantic is not correct. You cannot / should not embed a <table> tag inside an <h1> tag. You can apply a background image to the table with CSS

Plus your CSS, you have:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>

        <title>Stylesheet</title>
<STYLE TYPE="text/css">
<!--
BODY {font-size: 38 pt;
            font-family: Arial, Helvetica, Swiss, sans-serif;
            color: #000066;
            background-color:#ffffcc}
TABLE {color: yellow;
       background-image: url(http://geocities.com/worldskiingtravel/Beach-Unknown1.jpg);
            background-attachment:scroll;
            background-position:50% 50%;
            background-repeat: no-repeat}
-->
</STYLE>
</head>

<body>
<BODY>
<A NAME="Top"></A>
<H1 STYLE="text-align: center"> Travel for Life
<BR>
<BR>
<BR></H1>



</body>
</html>
When it should only be more like
Code:
BODY {font-size: 38 pt;
            font-family: Arial, Helvetica, Swiss, sans-serif;
            color: #000066;
            background-color:#ffffcc}
TABLE {color: yellow;
       background-image: url(http://geocities.com/worldskiingtravel/Beach-Unknown1.jpg);
            background-attachment:scroll;
            background-position:50% 50%;
            background-repeat: no-repeat}
The CSS is just to help you layout everything out - not to write text

_________________
Corey
Loud Commerce | Loud Worx | Merchant Account Blog
erski



Joined: 23 Jul 2006
Posts: 10

PostPosted: Sun Jul 30, 2006 8:03 am     Reply with quote

Thanks. One last question??? Where do I put the "link" to that style sheet? Right after <table border=0 height=590 LINK GOES HERE???> ect., or somewhere else in the table?

That'll be my last question for now. I know this is basic stuff, but the books I have leave a LOT of stuff unanswered.

thanks again
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8749
Location: Castle Pines North, CO USA

PostPosted: Sun Jul 30, 2006 8:43 am     Reply with quote

You already linked to your style sheet
Code:
<LINK REL="Stylesheet" TYPE=text/css" HREF="http://www.geocities.com/worldskiingtravel/stylesheet.css">
that is how I got the source cod. You need to change your style sheet. Right now, you have it as an HTML document

_________________
Corey
Loud Info | Loud Worx | Merchant Account Blog
erski



Joined: 23 Jul 2006
Posts: 10

PostPosted: Sun Jul 30, 2006 6:06 pm     Reply with quote

THANKS! That worked wonderfully! I can't thank you enough for taking the time to look into that. This is a great site. You should write a book (and start a webhosting business, if you haven't done so already). If you already have, what is the site address?
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8749
Location: Castle Pines North, CO USA

PostPosted: Mon Jul 31, 2006 4:44 am     Reply with quote

We have but we don't post it too much actually. Right now our business plan calls for all of our customers to be referred to us. That has worked for us for about three years very successfully. It helps to reduce fraud and helps us to understand our customers a bit more actually. We are thinking of changing that probably at the new year.

But please post any questions you might have so we can help.

_________________
Corey
Loud Commerce | Loud Worx | Merchant Account Blog
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> CSS All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial