I am trying to re-work an old site by replacing the html with css.
On the main page, I have a logo image which I needed centred on the
initial screen. I found the solution here: http://www.wpdfd.com/editorial/wpd0103.htm#toptip (the second example)
The problem is, under the image is a large table. But using the above
positioning, now the table starts at the top of the page and runs
underneath the image.
I plan to eliminate the table as soon as I figure out how to replicate
it using css elements, but first I'd like to get it positioned under
the image. I'm sure there is a way, but I am really too stupid to
actually understand absolute and relative and whatever else there is
in positioning.
(I ran the page through the Validator and I have it set to 4.01
Strict. The first point of contention it has is with the table, which
comes after the image, so I'm not too worried about that since, as I
said, I'll be getting rid of the table. I'm assuming, therefore, that
I haven't mucked anything up that is making it display this way.)
I feel like this might have something to do with layers, but if you
thought positioning made my head spin....
Anyway, I'd appreciate a demonstration, but I will gladly check out
any sort of idiot-proof tutorial you can point me to :)
Thanks! 4 2628
Jane Withnolastname wrote: I am trying to re-work an old site by replacing the html with css.
On the main page, I have a logo image which I needed centred on the initial screen. I found the solution here: http://www.wpdfd.com/editorial/wpd0103.htm#toptip (the second example)
An excellent tutorial on CSS positioning (at least IMO): http://brainjar.com/css/positioning/
The problem is, under the image is a large table. But using the above positioning, now the table starts at the top of the page and runs underneath the image.
When you use absolute positioning the block is taken out of the "normal"
flow of positioning from top of the page to bottom that you would
normally see if you didn't use any absolute positioning.
i.e. think of it like this if you had 3 relative positioned blocks A, B
then they would display as:
A
B
C
if you specify absolute positioning for A then you would have something
like this (for example - I'm just abitrarily showing where A has been
absolutely positioned to illustrate the point):
B
C
A
What you need to do is absolute position B and make B the container of C
and all the other blocks in your page like:
A
B
C
i.e. using your example:
<div id="horizon">
<div id="content">
<div class="bodytext">A</div>
</div>
</div>
<div id="B-aka-container">
<p>C</p>
<p>D</p>
</div>
and include an absolute position rule for B-aka-container.
NOTE: There are some things that don't strike me well about this example
as it uses negative offsets, wraps text with divs instead of p's, and
utilizes fixed point font sizes instead of %; just to mention a few of
the ugly things I can see.
Do yourself a favor - look elsewhere or at the very least if you really
need this and can't find it elsewhere adhere to as little of this
example as possible.
I plan to eliminate the table as soon as I figure out how to replicate it using css elements, but first I'd like to get it positioned under the image. I'm sure there is a way, but I am really too stupid to actually understand absolute and relative and whatever else there is in positioning.
Your not "stupid". In fact most people that profess that they are smart
are usually idiots IMO ;-)
BTW the learning curve for positioning is somewhat steep as it takes a
while to get the hang of things. Read the tutorial that I mentioned and
then read a couple more. After a while it will all gel ;-)
(I ran the page through the Validator and I have it set to 4.01 Strict. The first point of contention it has is with the table, which comes after the image, so I'm not too worried about that since, as I said, I'll be getting rid of the table. I'm assuming, therefore, that I haven't mucked anything up that is making it display this way.)
Take out the table and put something like this in place:
<p>Trying to move this below center</p>
you want to eliminate as many variables as possible - and then you could
add the table back and try to re-work it into CSS.
I feel like this might have something to do with layers, but if you thought positioning made my head spin....
Forget layers - that's a Netscape contrived thing that you luckily don't
ever have to worry about... (again).
--Nikolaos
On Thu, 28 Aug 2003 15:51:31 -0400, Nikolaos Giannopoulos
<ni******@solmar.ca> wrote: Jane Withnolastname wrote: I am trying to re-work an old site by replacing the html with css.
On the main page, I have a logo image which I needed centred on the initial screen. I found the solution here: http://www.wpdfd.com/editorial/wpd0103.htm#toptip (the second example) An excellent tutorial on CSS positioning (at least IMO): http://brainjar.com/css/positioning/
The problem is, under the image is a large table. But using the above positioning, now the table starts at the top of the page and runs underneath the image.
When you use absolute positioning the block is taken out of the "normal" flow of positioning from top of the page to bottom that you would normally see if you didn't use any absolute positioning.
i.e. think of it like this if you had 3 relative positioned blocks A, B then they would display as:
A B C
if you specify absolute positioning for A then you would have something like this (for example - I'm just abitrarily showing where A has been absolutely positioned to illustrate the point):
B C
A
What you need to do is absolute position B and make B the container of C and all the other blocks in your page like: A B C
i.e. using your example:
<div id="horizon"> <div id="content"> <div class="bodytext">A</div> </div> </div> <div id="B-aka-container"> <p>C</p> <p>D</p> </div>
and include an absolute position rule for B-aka-container.
Thanks for the link. I didn't look at it yet, because your explanation
and tips were perfect for me. I think I sorta get it now. At least,
enough to fix the position of my table. Anyway, I did bookmark that
site for future reference (like tomorrow, when I've forgotten
everything again!)
NOTE: There are some things that don't strike me well about this example as it uses negative offsets, wraps text with divs instead of p's, and utilizes fixed point font sizes instead of %; just to mention a few of the ugly things I can see.
Do yourself a favor - look elsewhere or at the very least if you really need this and can't find it elsewhere adhere to as little of this example as possible.
I would love to use something else, because this is all very
complicated, but I looked and looked and this was all I could find.
I am using this to center a combination of an image and text. The text
is three very short lines, separated by breaks. The lines are no
longer than the width of the image (374px), so I don't anticipate the
need for wrapping.
Having said that, I am re-writing my site using "em" instead of "px"
and "pt", etc. and would really like to implement that into this
style, but I am at a loss for how to do that. Since it is a relative
term, I don't think you can just translate pixels into "em" (I don't
even know what that stands for, but I know I'm supposed to use it!)
but if I could approximate it on my screen, I would be confident it
would display appropriately for others. Is there a tool or is this
sort of thing covered in that tutorial? I plan to eliminate the table as soon as I figure out how to replicate it using css elements, but first I'd like to get it positioned under the image. I'm sure there is a way, but I am really too stupid to actually understand absolute and relative and whatever else there is in positioning.
....In fact most people that profess that they are smart are usually idiots IMO ;-)
Well, yes, I've found that too. :p
BTW the learning curve for positioning is somewhat steep as it takes a while to get the hang of things. Read the tutorial that I mentioned and then read a couple more. After a while it will all gel ;-)
I will, thank you. (I ran the page through the Validator and I have it set to 4.01 Strict. The first point of contention it has is with the table, which comes after the image, so I'm not too worried about that since, as I said, I'll be getting rid of the table. I'm assuming, therefore, that I haven't mucked anything up that is making it display this way.)
Take out the table and put something like this in place:
<p>Trying to move this below center</p>
you want to eliminate as many variables as possible - and then you could add the table back and try to re-work it into CSS.
I feel like this might have something to do with layers, but if you thought positioning made my head spin....
Forget layers - that's a Netscape contrived thing that you luckily don't ever have to worry about... (again).
Thank god!!!
I'm gonna go look at that link now, check out their CSS tutorial and
see if I can figure out how to replace a table with css....
Thanks again.
In article <na********************************@4ax.com> in
comp.infosystems. www.authoring.stylesheets, Jane Withnolastname
<Ja**********************@yahoo.com> wrote: Since it is a relative term, I don't think you can just translate pixels into "em" (I don't even know what that stands for, but I know I'm supposed to use it!)
The bookstores have tons of books on CSS. The Web has scads of
tutorials.
As a teacher myself, might I suggest that you would be well advised
to study one of them? This business of cutely boasting of your
ignorance is wearing a bit thin, at least for me -- and it can't be
much fun for you either. When you don't know _anything_, it's not
very productive to focus on details until you first get a general
overview of the territory.
There's no shame in having elementary questions: we all started from
a position of 100% ignorance. But the net, like god, helps those who
help themselves.
--
Stan Brown, Oak Road Systems, Cortland County, New York, USA http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
validator: http://jigsaw.w3.org/css-validator/
Jane Withnolastname wrote: On Thu, 28 Aug 2003 15:51:31 -0400, Nikolaos Giannopoulos <ni******@solmar.ca> wrote:
Thanks for the link. I didn't look at it yet, because your explanation and tips were perfect for me. I think I sorta get it now.
I'm glad it helped however what you got was the workaround for this
specific problem. My help was not intended to replace the tutorial. If
you don't read this (or another) tutorial or a book on CSS-P then you
will most likely not get much further next time around.
Having said that, I am re-writing my site using "em" instead of "px" and "pt", etc. and would really like to implement that into this style, but I am at a loss for how to do that.
Unfortunately, I don't think anyone will help you on this one if you
don't at least read the first chapter of any CSS book or the most basic
of articles on CSS.
Since it is a relative term, I don't think you can just translate pixels into "em" (I don't even know what that stands for, but I know I'm supposed to use it!)
Calling yourself stupid is something that I don't agree with but
pretending to be ignorant is not something many will tolerate. If you
have no clue about this then you are definitely wasting the time of
others who may be reading this post.
but if I could approximate it on my screen, I would be confident it would display appropriately for others. Is there a tool or is this sort of thing covered in that tutorial?
You got to be kidding. Where are you getting this junk from - BTW the learning curve for positioning is somewhat steep as it takes a while to get the hang of things. Read the tutorial that I mentioned and then read a couple more. After a while it will all gel ;-)
I will, thank you.
Right, BUT not today. Maybe tomorrow and most likely never. Stan was
right this attitude is tiresome....
I'm gonna go look at that link now, check out their CSS tutorial and see if I can figure out how to replace a table with css....
Do yourself (and everyone else here) a favor - before jumping into CSS-P
read a couple tutorials and maybe even a book on CSS.
--Nikolaos This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Question |
last post by:
I am making a custom small menu which is most basic. Problem is that I can't
make the first step work for some reason.
I have an image to the left of where would be the layer positioned. This...
|
by: Dariusz |
last post by:
I am trying out a fully CSS-P layout (first time with floats) and am having
problems with getting certain DIV's from displaying properly - or rather -
they are being completely ignored.
Below is...
|
by: Michael Satterwhite |
last post by:
On my page, I'm positioning text on top of a graphic. I'm using the
following code on my page:
<img src="images/plainTop.gif" border="0" alt="" />
<div style="position: absolute; top:98px;...
|
by: Lloyd Sheen |
last post by:
I have now spent 5 hours on google/msdn looking for something useful in the
creation of user controls for asp.net. The VS 2003 has very limited support
for things such as absolute positioning of...
|
by: DraguVaso |
last post by:
Hi,
I have files I need to read, which contains records with a variable lenght.
What I need to do is Copy a Part of such a File to a new File, based on the
a Begin- and End-record.
I used...
|
by: NW Technicals |
last post by:
HELLO,
I created my site with absolute positioning of controls. Upon suggestions
from a good friend of mine I am trying to move my site to Relative
positioning, but having problems
All my...
|
by: NW Technicals |
last post by:
HELLO,
I created my site with absolute positioning of controls. Upon suggestions
from a good friend of mine I am trying to move my site to Relative
positioning, but having problems
All my...
|
by: Slick50 |
last post by:
I am about ready to finally give up on CSS and fall back to tables.
Positioning is becoming too frustrating for the novice with CSS
alone...
I have a simple form. Conceptually I divide up each...
|
by: Froggluver |
last post by:
I have some experience with CSS. Just enough to be dangerous in fact. :) I had a general question about positioning.
Is it possible create a box that is absolutely positioned on a page, and then...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: erikbower65 |
last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps:
1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal.
2. Connect to...
|
by: erikbower65 |
last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA:
1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
|
by: Taofi |
last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same
This are my field names
ID, Budgeted, Actual, Status and Differences
...
|
by: DJRhino1175 |
last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this -
If...
|
by: Rina0 |
last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
|
by: DJRhino |
last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer)
If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _
310030356 Or 310030359 Or 310030362 Or...
|
by: lllomh |
last post by:
How does React native implement an English player?
|
by: Mushico |
last post by:
How to calculate date of retirement from date of birth
| |