Solved

Text placement using CSS

Posted on 1997-12-08
4
189 Views
Last Modified: 2013-12-25
How can I get the bottom edge of text to sit flush on the bottom border of a single-cell table using CSS?

I need to create a 300x150 px red box with the word SAMPLE sitting FLUSH on the bottom of the box.
0
Comment
Question by:m110585
  • 3
4 Comments
 
LVL 1

Accepted Solution

by:
serobert earned 100 total points
ID: 1855883
This should work, but if you need any more help, please let me know.  You can email me at seanrobertson@hotmail.com

<html>
<head>
<title>DHTML Test</title>
<style type="text/css">
#sample {font-size:18pt}
</style>
</head>
<body bgcolor="#FFFFFF">
<h1>Sample</H1>
<table border="0" width="300" height="150" cellspacing="0" cellpadding="0">
  <tr valign="BOTTOM">
    <td bgcolor="#FF0000" width="359" valign="BOTTOM" height="74">
      <div id="Layer1" style="position:relative; left:97; top:25; width:98; height:20; z-index:1;">
        <span ID="sample">SAMPLE</span>
      </div>
    </td>
  </tr>  
</table>
</body>
</html>
0
 
LVL 1

Expert Comment

by:serobert
ID: 1855884
the width attribute in the following line (which appeared in the table of the previous code):
<td bgcolor="#FF0000" width="359" valign="BOTTOM" height="74">
 can be removed so that the line appears as:
<td bgcolor="#FF0000" valign="BOTTOM" height="74">
It doesn't make any difference, but is just cleaner coding.
0
 
LVL 1

Expert Comment

by:serobert
ID: 1855885
same goes with "height="74"".  Sorry about that, the editor I used to layout the table took a crap.
0
 

Author Comment

by:m110585
ID: 1855886
Turns out that IE 3.02 (4.70.1300) doesn't display what I'm trying to do in CSS. :-(
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem to be resolved in this article Currently, development of website and web application can be done without writing thousands of lines of programming code by hand. Description This can be done through by using a open source framework such …
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

920 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

14 Experts available now in Live!

Get 1:1 Help Now