Solved

Fixed height & relative position

Posted on 2006-07-17
7
3,624 Views
Last Modified: 2012-05-05
Hi folks,

I want to have a picture/text 50px above the bottom of a TD.

My code:

<table width="780" border="0" align="center" cellpadding="0" cellspacing="0" class="mainTable">
  <tr>
    <td colspan="3">{header}</td>
  </tr>
  <tr>
    <td colspan="3">{horizonMenu}</td>
  </tr>
  <tr>
    <td width="100" valign="top">{googleSearch}
        <div id="leftBlock"></div>
      <br />
        <br/>
        <div id="icons">{rssButton}</div></td>
    <td width="750" valign="top" id="centralBlock" align="justify"><!-- TemplateBeginEditable name="subTitle" -->
      <h1>{title}</h1>
      <!-- TemplateEndEditable --><!-- TemplateBeginEditable name="content" -->
      <p>&nbsp;</p>
    <!-- TemplateEndEditable --> </td>
  </tr>
  <tr>
    <td colspan="3"><div align="center">{footer}</div></td>
  </tr>
</table>

My CSS :

#icons {
      position: fixed;
      bottom: 50px;
      font-size: 10px;
}

Please note <div id="icons">{rssButton}</div> above. I want to have this rssButton 50 px higher than the following (bottom line of ) TD or the bottom of the browser window, whichever is higher, no matter how I resize the window.

My code does not work properly, though.

right now, it can:

(a) always stay 50 px above the bottom of the WINDOW, but not the TD. While it is okay in many cases (if the height of the table is longer than my browser window's height), it is not what I want if the table is very short.

For example, if the table's height is only 100px, and my browser window's height is 600px, and I maxmize my browser window, the rssButtom will stay far below the table, but exactly 50px above the bottom of the window.

(a) works in fireforx but does not work in IE.

How can I fix that?

Thanks
0
Comment
Question by:tiger0516
  • 4
  • 3
7 Comments
 
LVL 7

Assisted Solution

by:maUru
maUru earned 50 total points
Comment Utility
i dont think im understanding what you want,

but does this give the desired result?

#icons {
     position: relative;
     bottom: 50px;
     font-size: 10px;
}
0
 
LVL 17

Accepted Solution

by:
mreuring earned 250 total points
Comment Utility
Position: fixed doesn't exist in IE and even if it did, it's always relative to your viewport (the window in this case) so you'd never be able to get it to behave as you want it to. What you want would have to be scripted, no amound of CSS is going to make this work (at least, it wouldn't be pretty).
So, I suggest you ask this question to be moved to the JavaScript section http:javascript as they might be more capable of helping you sorting this out.
0
 
LVL 7

Expert Comment

by:maUru
Comment Utility
changing to relative does what he wants (i think)
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 17

Expert Comment

by:mreuring
Comment Utility
I think position relative might provide for a nice compromise, but it certainly don't sound like a fix. Position relative doesn't position the element in relation to the viewport after all.
0
 
LVL 17

Assisted Solution

by:mreuring
mreuring earned 250 total points
Comment Utility
Oh, I just figured I should add this, since it's about an rss feed. The default accepted way of exposing an RSS feed is by adding a link alternate to the head of your document:
<link rel="alternate" type="application/rss+xml" title="RSS" href="your-rss-feed-here">

Although perhaps it won't work in every single browser out there, all the modern browsers will expose that link in one way or another (usually in the address-bar).
0
 
LVL 7

Expert Comment

by:maUru
Comment Utility
SOME DAMN AUTHOR FEEDBACK WOULD HELP.
0
 
LVL 17

Expert Comment

by:mreuring
Comment Utility
Cool down maUru, maybe he/she isn't in the office today, or on sick-leave. Nomatter what, there's no reason nor use to start shouting.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now