Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 03-12-2003, 04:52 AM   #1 (permalink)
bdl
Senior Contributor
 
Join Date: May 2002
Location: vta.ca.usa
Posts: 555
bdl is on a distinguished road
Padding

I need a method for padding a webpage, does everyone usually use a transparent gif image for that? Whats the best way of doing it? What I need to be able to do is pad the page so that it shows a footer on or near the bottom even though the main content of the page is minimal or only takes up half the window. Not using frames. Would prefer tables to css positioning. Anyone has some good ideas or methods, throw em out.

bdl is offline   Reply With Quote
Old 03-12-2003, 06:05 AM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,444
sde is on a distinguished road
1px by 1px transparent gifs work wonders.

here's an idea of how the bottom of codenewbie works:
PHP Code:
<table border=0 cellspacing=0 cellpadding=0 width=100%>
<
tr bgcolor=#000000>
  
<td height=1><img src=images/spacer.gif width=1 height=1></td>
</
tr>

<
tr bgcolor=#4B7A3C>
  
<td align=center>
   &
copy 2002 2003 CodeNewbie.com All Rights Reserved
  
</td>
</
tr>

<
tr bgcolor=#000000>
  
<td height=1><img src=images/spacer.gif width=1 height=1></td>
</
tr>
</
table
i highly recommend putting the size parameters of the spacer image in .. otherwize they might show up like big images before the page completely loads.

css is another option, but i gotta get to work now .. will post an example later.
sde is offline   Reply With Quote
Old 03-12-2003, 06:37 AM   #3 (permalink)
bdl
Senior Contributor
 
Join Date: May 2002
Location: vta.ca.usa
Posts: 555
bdl is on a distinguished road
Hey! Thanks for the reply; yeah, I remember our discussion on that previously, I just couldn't remember all the details. Now, I remember a CSS method of putting an image either horizontally / vertically across the screen, I'll look into that...what I want to do is pad the screen vertically, so the page will always be a certain height no matter how much content. I guess I could just use the old '<p>&nbsp;</p>' but thats sort of tacky..
bdl is offline   Reply With Quote
Old 03-12-2003, 07:23 AM   #4 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,444
sde is on a distinguished road
do you want to split the screen in equal parts, or like the home page of codenewbie? you can always use table padding

something like this would fill the entire screen:
PHP Code:
<table border=0 cellspacing=0 cellpadding=20 width=100height=100%>
<
tr>
  <
td width=150 valign=topleft cell </td>
  <
td valign=topno width hereit will stretch </td>
  <
td width=150 valign=topright cell </td>
</
tr>
</
table
hope this helps.
sde is offline   Reply With Quote
Old 03-12-2003, 12:39 PM   #5 (permalink)
abc123
bloomberg
 
abc123's Avatar
 
Join Date: Jun 2002
Location: bloomberg
Posts: 263
abc123 is on a distinguished road
Send a message via AIM to abc123 Send a message via Yahoo to abc123
just use css, not a useless gif...

for a gap at the top:

Code:
<style type="text/css">
  body {
          top-margin: 10px;
          left-margin: ###px;
          ...-margin: ###px;
  }
</style>
nothing easier!
__________________
-- bloomberg.
abc123 is offline   Reply With Quote
Old 03-12-2003, 04:12 PM   #6 (permalink)
bdl
Senior Contributor
 
Join Date: May 2002
Location: vta.ca.usa
Posts: 555
bdl is on a distinguished road
Quote:
Originally posted by sde
do you want to split the screen in equal parts, or like the home page of codenewbie? you can always use table padding

something like this would fill the entire screen:
PHP Code:
<table border=0 cellspacing=0 cellpadding=20 width=100height=100%>
<
tr>
  <
td width=150 valign=topleft cell </td>
  <
td valign=topno width hereit will stretch </td>
  <
td width=150 valign=topright cell </td>
</
tr>
</
table

Thats exactly what I needed, just to use the 'height' parameter in the table. Uh duh! =) Thanks again.

Test page.
bdl is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 12:57 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting