Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
How to get Banner a few pixels from top? -absolute position using include fails
Old 12-13-2004, 10:52 AM How to get Banner a few pixels from top? -absolute position using include fails
danv's Avatar
Average Talker

Posts: 18
Trades: 0
How can I have a Banner (using an include) positioned a few pixels from the
top of a web page?
I read that you can't use an include if it uses absolute positioning because
the renderer doesn't know how big the include will be within a div. This is
true for my hosting at ipowerweb on Apache.

Is there another way to get the banner at the top of the page using an
include? Can I maybe set the body top padding and top margin to 1 px?

I can't seem to use static positioning correctly as there is a much larger gap that when I use absolute positioning.

Since Includes are the fastest way to load my 12 pages that look similar (I
think).
I plan on using 4 includes. A banner, footer, 2 columns In a table (far
left column, far right column)

Any advice is greatly appreciated.
Thanks, Dan V.
danv is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-13-2004, 01:36 PM
Junior Talker

Posts: 1
Trades: 0
are you using PHP?
geordie is offline
Reply With Quote
View Public Profile
 
Old 12-13-2004, 01:43 PM I am not using PHP
danv's Avatar
Average Talker

Posts: 18
Trades: 0
I am not using PHP, I am using macromedia dreamweaver 2004 MX, but want to do it with css or html.
danv is offline
Reply With Quote
View Public Profile
 
Old 12-13-2004, 02:42 PM
danv's Avatar
Average Talker

Posts: 18
Trades: 0
Best thing I can think of is set the Body and thus page margin to 0 or 3 px. Then I don't have to bother with div's and positioning and browser support.

<style type="text/css">

body {
font-family: arial, verdana, sans-serif;
font-size: 1em;
margin: 0px;
paddding: 0px;
}
danv is offline
Reply With Quote
View Public Profile
 
Old 12-13-2004, 02:58 PM
theshiznit's Avatar
Registered User

Posts: 214
Trades: 0
try this....


Code:
table
{
position:absolute;
top:1px;
}
theshiznit is offline
Reply With Quote
View Public Profile
 
Old 12-13-2004, 03:30 PM
danv's Avatar
Average Talker

Posts: 18
Trades: 0
Thanks.

Will this give me the same problem as stated above, where includes don't work with absolute positioning of div's or does this not affect tables?


This code works locally with IE 6.0 (no include) But I have a left 1/2 inch space for some reason?

<table style="position:absolute; top:0px; margin:0px; background:yellow">
<tr>
<td>This is my header in a table.
</td>
</tr>
</table>
danv is offline
Reply With Quote
View Public Profile
 
Old 12-13-2004, 03:55 PM
NateDogg's Avatar
Extreme Talker

Posts: 163
Trades: 0
So how are you "including" these files?? I think you were right when you said to change the body margin-top (http://www.w3schools.com/css/pr_margin-top.asp) It'll probably work the best.
__________________
Nathan


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
NateDogg is offline
Reply With Quote
View Public Profile
 
Old 12-13-2004, 04:03 PM
danv's Avatar
Average Talker

Posts: 18
Trades: 0
I use the Dreamweaver Server side include. It comes directly after the <body> statement.
Insert > HTML > Script Objects > Server Side Includes (for MX 2004)

<body>
<!--include virtual="/path_relative_to_site.shtml" -->
...
danv is offline
Reply With Quote
View Public Profile
 
Old 12-13-2004, 04:20 PM
danv's Avatar
Average Talker

Posts: 18
Trades: 0
This works better:

"If Absolute positioning is used you must specify the "top" and "left" properties"
http://www.w3schools.com/css/pr_class_position.asp

<table style="position:absolute; top:0px; left:0px; background:yellow">
<tr>
<td>This is my header in a table.
</tr>
</table>
danv is offline
Reply With Quote
View Public Profile
 
Old 12-14-2004, 01:31 PM
NateDogg's Avatar
Extreme Talker

Posts: 163
Trades: 0
Interesting, I've never even heard of including files this way. Thanks for the extra piece of knowledge.

Quick question. Is this W3C compliant?
__________________
Nathan


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
NateDogg is offline
Reply With Quote
View Public Profile
 
Old 12-14-2004, 01:38 PM
Rincewind's Avatar
Super Talker

Posts: 108
Trades: 0
The server side includes in dreamweaver are just the normal SSI for Apache and ASP. When the person hit your page, the server peices together all the included files and sends the result to the browser. The whole thing comes in one big lump. The joining up is done on the server, not on the client. The browser will render it just fine.
__________________
Q-4.net -
Please login or register to view this content. Registration is FREE

Stylegallery.co.uk -
Please login or register to view this content. Registration is FREE

Splodgy.com -
Please login or register to view this content. Registration is FREE
Rincewind is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How to get Banner a few pixels from top? -absolute position using include fails
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.97751 seconds with 12 queries