473,378 Members | 1,386 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Aligning to left & right corners

I'm trying to set up a standard "footer" on my pages. I just
discovered by reading this newsgroup that straight html is no good and
I need to learn how to do it using css. So I while I'm learning css I
took some code from a sample web page, but I don't think it's optimal.

What I'm trying to achieve is a horizontal rule at the bottom of the
page with a text block left aligned on the left and right aligned on
the right. So there would be a line and then text in the 2 corners
below the line.

Here's what I have. It works, but since I don't have a lot of
experience, I'm wondering if there is a better way? The pages validate
as HTML 4.01 Transitional, so maybe it's good enough?

<HR>

<div id="content">
Page last updated: <script LANGUAGE="JavaScript"
src="js/pagedate.js" type="text/javascript"></script>
</div>

<div id="footer"> View all the PAD fields in a pop-up
<a href="javascript:PopUp('\\apps\\ctparts\\pad_file. xml')">
<img src="graphics/logo3.jpg" alt="Portable Application
Description"
title="View all the PAD fields in a pop-up" align=TOP>
</a>
</div>
Here's the relevant portions of the external stylesheet.

#content {
float: left;
padding-top: 0.1em;
text-align: left;
font-size: 0.75em;
font-family: "Times New Roman", Arial, Verdana, serif;
}
#footer {
float: right;
padding-top: 0.1em;
text-align: right;
font-size: 0.75em;
font-family: "Times New Roman", Arial, Verdana, serif;
}

--
Erik
Jul 21 '05 #1
4 1867
er***@nospam.wanted.here wrote:
I'm trying to set up a standard "footer" on my pages. I just
discovered by reading this newsgroup that straight html is no good and
I need to learn how to do it using css. So I while I'm learning css I
took some code from a sample web page, but I don't think it's optimal.
The left/right float solution works pretty well but has its pitfalls.
Please supply your page URL for us to have a look at. There are too many
other variables to evaluate a code snippet.
Here's what I have. It works, but since I don't have a lot of
experience, I'm wondering if there is a better way? The pages validate
as HTML 4.01 Transitional, so maybe it's good enough?
Why Transitional, not Strict?
<div id="content">
Page last updated: <script LANGUAGE="JavaScript"
src="js/pagedate.js" type="text/javascript"></script>
</div>
And if I don't have Javascript? Does your server allow SSIs or PHP/ASP?
You can lose the LANGUAGE attribute.
<div id="footer"> View all the PAD fields in a pop-up
<a href="javascript:PopUp('\\apps\\ctparts\\pad_file. xml')">
<img src="graphics/logo3.jpg" alt="Portable Application
Description"
title="View all the PAD fields in a pop-up" align=TOP>
</a>
</div>
Aha - it's an intranet. Hopefully you can ensure all clients have
Javascript installed. You should supply a width and a height in the
<img> tag to allow the browser to do the layout before downloading the file.
font-family: "Times New Roman", Arial, Verdana, serif;


So you're saying you want it in TNR (a serif font) if available,
otherwise Arial (a standard sans-serif font), Verdana (an abnormally
wide sans font), followed by the system default serif font? What a
bizarre mixture! Save yourself a hundred bytes and don't specify the
font at all.

--
Mark.
http://tranchant.plus.com/
Jul 21 '05 #2
On Thu, 02 Dec 2004 08:39:26 +0000, Mark Tranchant
<ma**@tranchant.plus.com> wrote:
The left/right float solution works pretty well but has its pitfalls.
Please supply your page URL for us to have a look at. There are too many
other variables to evaluate a code snippet.
Sorry for that limitation. The page is for internal company use and
isn't available from the internet. I don't have a web site that I can
post it to. I hoped I posted the minimum needed. Do you have any
information on the pitfalls? Although I only need to worry about IE at
the moment, I see Firefox as a potential in the future.
Here's what I have. It works, but since I don't have a lot of
experience, I'm wondering if there is a better way? The pages validate
as HTML 4.01 Transitional, so maybe it's good enough?


Why Transitional, not Strict?


Honestly? Because I just started learning html and css for this
project redesign and it validates as Transitional, but failed strict.
But you can be sure that Strict is the goal in the near future.
And if I don't have Javascript? Does your server allow SSIs or PHP/ASP?
You can lose the LANGUAGE attribute.


Since it is for internal use only, I won't have any trouble specifying
what the client uses. Some of the code is also intended for
distribution on disc, so javascript seemed to be the logical choice
for both.

I'm not sure why the LANGUAGE attribute is there. I don't remember is
that came from the original or if I was advised to add it somewhere
along the way. It's one of those things I'm slowly learning to change
to get to Strict.
<div id="footer"> View all the PAD fields in a pop-up
<a href="javascript:PopUp('\\apps\\ctparts\\pad_file. xml')">
<img src="graphics/logo3.jpg" alt="Portable Application
Description"
title="View all the PAD fields in a pop-up" align=TOP>
</a>
</div>


Aha - it's an intranet. Hopefully you can ensure all clients have
Javascript installed. You should supply a width and a height in the
<img> tag to allow the browser to do the layout before downloading the file.


Yes, for the moment I have it easy, the supported browser is IE and
it's for internal use only. I'll add the width and height to the img.
font-family: "Times New Roman", Arial, Verdana, serif;


So you're saying you want it in TNR (a serif font) if available,
otherwise Arial (a standard sans-serif font), Verdana (an abnormally
wide sans font), followed by the system default serif font? What a
bizarre mixture! Save yourself a hundred bytes and don't specify the
font at all.


These were the original fonts as listed for the page, but I changed
the order around. I wanted the font to appear differently from the
body font so I thought choosing a serif font would do it. Would it be
better just using font-family: serif; ?

Thanks for taking a look at the code and your comments.

--
Erik
Jul 21 '05 #3
On Thu, 02 Dec 2004 06:45:24 -0800, er***@nospam.wanted.here wrote:
The page is for internal company ...
Before others point it out, I will point out that this
group's name contains 'www', rather than 'company intranet'.
..use and isn't available from the internet.
So move it there.
..I don't have a web site that I can post it to.


GeoCities. Note that Geocities inserts code that makes pages
invalid, so it might pay to make a .zip of the relevant files
and link to it from your example page.

Speaking of which, check here for tips on that example..
<http://www.spartanicus.utvinternet.ie/help_us_help_you.htm> ..and..
<http://www.physci.org/codes/sscce.jsp>

HTH

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
Jul 21 '05 #4
er***@nospam.wanted.here wrote:
font-family: "Times New Roman", Arial, Verdana, serif;
So you're saying you want it in TNR (a serif font) if available,
otherwise Arial (a standard sans-serif font), Verdana (an abnormally
wide sans font), followed by the system default serif font? What a
bizarre mixture! Save yourself a hundred bytes and don't specify the
font at all.
These were the original fonts as listed for the page, but I changed
the order around. I wanted the font to appear differently from the
body font so I thought choosing a serif font would do it. Would it be
better just using font-family: serif; ?


You'd be better not specifying font-family at all, as it seems like you
don't really care given the current font list.

--
Mark.
http://tranchant.plus.com/
Jul 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: CJM | last post by:
I want to create a footer with 3 items, one of which will always stay to the left, one will be in the centre, and the 3rd will be at the right. As you might imagine, I want the Right & Centre items...
17
by: orekinbck | last post by:
Hi There Say I want to check if object1.Property1 is equal to a value, but object1 could be null. At the moment I have code like this: if (object1 != null) { if (object1.Property ==...
1
by: Linux Boy via .NET 247 | last post by:
(Type your message here) Hi everyone, I would like to ask a question about aligning text within one label. I have an application that everytime the user click on Enter Record button, they will...
11
by: designkitt | last post by:
Hello, I am having a problem aligning a cell in a table and have tried everything I can think of to correct this without any luck: It appears that the white area, which is an image in the background...
6
by: Schraalhans Keukenmeester | last post by:
I want to achieve the following: A small image in each of the corners of a box, like below: +-------------------------------+ | + | + | + | + | + | +
2
by: agbee1 | last post by:
Hello: I've finally made the effort to ween myself from overly using tables and use CSS for my positioning. However, I am having a problem with my navigational menu properly aligning in Firefox,...
5
by: Timeri | last post by:
This is a bit confusing until you actually see what I'm talking about but the main content of my page is not growing with the right column. I want the main content (left/larger column) to take into...
14
by: gaijinco | last post by:
I was a hobbist web coder for years but I had to sidestep for a while. Now I'm trying to return to it and I'm trying to clarify how am I supposed to do somethings with CSS v.s. HTML and I'm...
10
unstoppablekatia
by: unstoppablekatia | last post by:
I have a website that has images on it, and underneath the images are text. My only option of aligning the images and text separate from each other, is to do <div align="right">, <center>, or <div...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.