Coding HTML: Simple banner.

User 2515511 Photo


Registered User
6 posts

Hello everyone!
I am just a beginner and I am trying to do the layout for my page.

I think I got the main structure down, and now I am trying to make my banner fit exactly (without any white spaces) my top cell. If I try to fit the image as an image it leaves borders, thus I decided to go about it as a background, but the first time i tried to set it, it expanded the size of the cell itself, and now it is just laying there very small. Help anyone?

CODE:

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


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>

<title>WEB PAGE TITLE GOES HERE</title>

</head>

<body style="margin: 0px; padding: 0px; font-family: 'Trebuchet MS',verdana;">

<div>
<table width="100%" style="height: 100%;" cellpadding="10" cellspacing="0" border="0">

<!-- <3 HEADER SECTION <3 -->
<tr>
<td style="height:15%;">
<img src="BANNER2.png" style="width100%; height:15%;" />
</td>
</tr>


<!-- <3 CONTENT SECTION <3 -->
<tr><td height="75%" bgcolor="black"></td></tr>


<!-- <3 FOOTER SECTION <3 -->
<tr><td align="center" height="10%" bgcolor="salmon"></td></tr>
</table>
</div>
<style>
#banner {position:fixed; left:0; top:0; z-index:1; height:100% width:100%; }
</style>
</body>

<html>

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

Thank you very much for your time in Advance!

Ona
User 187934 Photo


Senior Advisor
20,190 posts

What size is your banner image?
Can you share a link?:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2515511 Photo


Registered User
6 posts

Yes just one second let me upload the picture :D
User 187934 Photo


Senior Advisor
20,190 posts

Have you taken a look at using CSS instead of tables for your design?:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2515511 Photo


Registered User
6 posts

This is the link :D :

http://img809.imageshack.us/img809/9097/banner2wt.png

I know it is pretty big, but the intent would be for it to resize itself for different screens, and even stretch out it is okay, because I designed it in such a way that it would look optimal when stretched.

Thank you so much for the quick reply by the way!!
User 2515511 Photo


Registered User
6 posts

Yup, and i have been messing around with it, but still couldn't get it to do what I needed it to:| So I thought, let me do this simply, but if you want to insert CSS please do, I have been working with both languages :D
User 2515511 Photo


Registered User
6 posts

Or wait, you are saying i should do the entire thing in CSS?
User 187934 Photo


Senior Advisor
20,190 posts

Yes, Your just getting started so now would be the proper time. It's really easy and using a style sheet you can make a change to that and it will update the look of all your pages. A huge time saver.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2515511 Photo


Registered User
6 posts

I see, yup yup, I think I'll do just that, new adventure sounds promising :cool:

Thank you very much for your help Eric!!

Off i go!

:D
User 187934 Photo


Senior Advisor
20,190 posts

Your going to want to look at responsive website building.
http://www.1stwebdesigner.com/css/respo … -tutorial/
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.