473,785 Members | 2,807 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Align two images in a table..one at top..one at bottom..how?

Hi folks. I'm trying to figure out how I can insert 2 different
graphics into a table cell and align one to the top and one to the
bottom using CSS. I used the "vertical align" to "top" in DW but
nothing happens. I don't understand why. Please help. Thanks.

Jul 26 '06 #1
7 3347
PTM
"ridergroov " <ri*********@co mcast.netwrote in message
news:11******** *************@7 5g2000cwc.googl egroups.com...
Hi folks. I'm trying to figure out how I can insert 2 different
graphics into a table cell and align one to the top and one to the
bottom using CSS. I used the "vertical align" to "top" in DW but
nothing happens. I don't understand why. Please help. Thanks.
there's a couple of ways to do it but it depends on what else is in the cell
with the two pics.

if its only the two pics then use the 'margin-bottom:VU;' tag applied to the
top pic and adjust the V (value) and U (units) according to how you want it
to display.

if you have text along with the pics then you can either use a third style,
specifically for the text if its only to float along side, or as a wrapper
for the whole cell contents if you want wrap round.

Phil
Jul 26 '06 #2
Thanks very much Phil. I did what you said and I can get the top image
exactly where I wnat it and move it around using the margin-bottom tag.
That works really well. The problem is with the rest of the stuff I
wnat to put in the table. If i position the cursor to the right of the
current image and type, it puts it way below the image. There is a big
space that I can't use at all in between the bottom of the image and
where the text starts typing. If I go to put an image in, it puts it
to the left of the image. It's as if nothing can go directly below the
image. Why does it do that and how do I fix it? Thanks very much for
your time.

PTM wrote:
"ridergroov " <ri*********@co mcast.netwrote in message
news:11******** *************@7 5g2000cwc.googl egroups.com...
Hi folks. I'm trying to figure out how I can insert 2 different
graphics into a table cell and align one to the top and one to the
bottom using CSS. I used the "vertical align" to "top" in DW but
nothing happens. I don't understand why. Please help. Thanks.

there's a couple of ways to do it but it depends on what else is in the cell
with the two pics.

if its only the two pics then use the 'margin-bottom:VU;' tag applied to the
top pic and adjust the V (value) and U (units) according to how you want it
to display.

if you have text along with the pics then you can either use a third style,
specifically for the text if its only to float along side, or as a wrapper
for the whole cell contents if you want wrap round.

Phil
Aug 1 '06 #3
On 26 Jul 2006 12:39:24 -0700, "ridergroov " <ri*********@co mcast.netwrote:
>Hi folks. I'm trying to figure out how I can insert 2 different
graphics into a table cell and align one to the top and one to the
bottom using CSS. I used the "vertical align" to "top" in DW but
nothing happens. I don't understand why. Please help. Thanks.
It's hard to figure what you're trying to achieve here. Could you explain it
more fully? (And maybe give us a URI?)

Why do you want to put two images (and maybe some text) into the same cell in
the table? I would put one item per cell and arrange any other items in the
table using ROWSPAN and COLSPAN as appropriate.

Is it that you're a beginner? No harm in that; we all started out that way.
But since you can handle the hints you've already been given, you'll have no
trouble doing your table the right way.
Aug 2 '06 #4
Well I'm more of an I use to do HTML and didn't for a few years and
need major refreshing. I'm working on learning CSS more now so I was
kind of guided into using that for the most part. Try this url:
http://paymca.org/newy3/facilities.htm

It's not finished so don't mind the sloppiness. What I have is the tip
center main table centered using CSS and that table has two columns.
On the left you see the vertical nav menu. IN the right table you see
the "our facilities" box. That is actually another 2 column table
inside the main table that I first spoke of. I am using CSS to put the
"our facilities table" margin-bottom 150px for it's positioning. I
figured I could just throw another table right under that and just use
CSS with the margin-bottom and put a different pixel value and it would
position it under that. Apparently that is not the case. I guess the
best thing to do woudl be to split the right column of the main table
into another table? I guess I'm trying to stay away from that because
I was on another group and they basically blasted me for using tables
so I thought using more tables in my structure was a bad thing.
Anyway, I dont know what the best thing to do is to acheive what I
want. I want to be able to put text or other pictures under where the
"facilities " box is. I hope this explains it a little better.
Consider me a newb when you write back. I appreciate any info you
could give. Thanks.
Christopher P. Winter wrote:
On 26 Jul 2006 12:39:24 -0700, "ridergroov " <ri*********@co mcast.netwrote:
Hi folks. I'm trying to figure out how I can insert 2 different
graphics into a table cell and align one to the top and one to the
bottom using CSS. I used the "vertical align" to "top" in DW but
nothing happens. I don't understand why. Please help. Thanks.

It's hard to figure what you're trying to achieve here. Could you explain it
more fully? (And maybe give us a URI?)

Why do you want to put two images (and maybe some text) into the same cell in
the table? I would put one item per cell and arrange any other items in the
table using ROWSPAN and COLSPAN as appropriate.

Is it that you're a beginner? No harm in that; we all started out that way.
But since you can handle the hints you've already been given, you'll have no
trouble doing your table the right way.
Aug 2 '06 #5
ALright. I notice that as soon as I add CSS (margin-bottom = 150px) to
the "facilities " table, I can no longer do anything directly below that
table. It jumps the cursor more than double the size of the table down
in that cell when I press enter. If i hit the right arrow key, it puts
the cursor in the left main table cell! I don't get this. Really
making me mad. What is going on?

ridergroov wrote:
Well I'm more of an I use to do HTML and didn't for a few years and
need major refreshing. I'm working on learning CSS more now so I was
kind of guided into using that for the most part. Try this url:
http://paymca.org/newy3/facilities.htm

It's not finished so don't mind the sloppiness. What I have is the tip
center main table centered using CSS and that table has two columns.
On the left you see the vertical nav menu. IN the right table you see
the "our facilities" box. That is actually another 2 column table
inside the main table that I first spoke of. I am using CSS to put the
"our facilities table" margin-bottom 150px for it's positioning. I
figured I could just throw another table right under that and just use
CSS with the margin-bottom and put a different pixel value and it would
position it under that. Apparently that is not the case. I guess the
best thing to do woudl be to split the right column of the main table
into another table? I guess I'm trying to stay away from that because
I was on another group and they basically blasted me for using tables
so I thought using more tables in my structure was a bad thing.
Anyway, I dont know what the best thing to do is to acheive what I
want. I want to be able to put text or other pictures under where the
"facilities " box is. I hope this explains it a little better.
Consider me a newb when you write back. I appreciate any info you
could give. Thanks.
Christopher P. Winter wrote:
On 26 Jul 2006 12:39:24 -0700, "ridergroov " <ri*********@co mcast.netwrote:
>Hi folks. I'm trying to figure out how I can insert 2 different
>graphics into a table cell and align one to the top and one to the
>bottom using CSS. I used the "vertical align" to "top" in DW but
>nothing happens. I don't understand why. Please help. Thanks.
It's hard to figure what you're trying to achieve here. Could you explain it
more fully? (And maybe give us a URI?)

Why do you want to put two images (and maybe some text) into the same cell in
the table? I would put one item per cell and arrange any other items in the
table using ROWSPAN and COLSPAN as appropriate.

Is it that you're a beginner? No harm in that; we all started out that way.
But since you can handle the hints you've already been given, you'll have no
trouble doing your table the right way.
Aug 2 '06 #6
On 2 Aug 2006 09:49:42 -0700, "ridergroov " <ri*********@co mcast.netwrote:
>Well I'm more of an I use to do HTML and didn't for a few years and
need major refreshing. I'm working on learning CSS more now so I was
kind of guided into using that for the most part. Try this url:
http://paymca.org/newy3/facilities.htm

It's not finished so don't mind the sloppiness. What I have is the tip
center main table centered using CSS and that table has two columns.
On the left you see the vertical nav menu. IN the right table you see
the "our facilities" box. That is actually another 2 column table
inside the main table that I first spoke of. I am using CSS to put the
"our facilities table" margin-bottom 150px for it's positioning. I
figured I could just throw another table right under that and just use
CSS with the margin-bottom and put a different pixel value and it would
position it under that. Apparently that is not the case. I guess the
best thing to do woudl be to split the right column of the main table
into another table? I guess I'm trying to stay away from that because
I was on another group and they basically blasted me for using tables
so I thought using more tables in my structure was a bad thing.
Anyway, I dont know what the best thing to do is to acheive what I
want. I want to be able to put text or other pictures under where the
"facilities " box is. I hope this explains it a little better.
Consider me a newb when you write back. I appreciate any info you
could give. Thanks.
I took a look at the source, but I really couldn't see through all the
Javascript to tell what's going on with the HTML. Not a criticism, just a
fact.

A lot of people will jump on you for using tables to lay out a page. (Be
glad you weren't here four or five years ago when the battles between
"purists" and "deesyners" were going hot and heavy. ;) I agree using tables
purely for layout is not optimum, but since I do it myself I can't object too
loudly.

Anyway, stick with the principle of one item per table cell and you'll
save yourself a lot of grief. That way you can use CSS to fine-tune the
spacings for any item without messing up something else.

You should also think about getting rid of the spacer gifs and the
BGCOLOR statements in the tables. Doing that sort of thing with CSS will make
your pages much easier to maintain.

What you've got looks like a decent start though.

Best,

CPW
Aug 3 '06 #7
Thanks very much for your info. I dont know if you are still following
this thread or not but if you could look at it one last time. I removed
the table that had all the java rollovers so it should look a little
cleaner. Thank you again even if I dont' hear back. Much appreciated.
Christopher P. Winter wrote:
On 2 Aug 2006 09:49:42 -0700, "ridergroov " <ri*********@co mcast.netwrote:
Well I'm more of an I use to do HTML and didn't for a few years and
need major refreshing. I'm working on learning CSS more now so I was
kind of guided into using that for the most part. Try this url:
http://paymca.org/newy3/facilities.htm

It's not finished so don't mind the sloppiness. What I have is the tip
center main table centered using CSS and that table has two columns.
On the left you see the vertical nav menu. IN the right table you see
the "our facilities" box. That is actually another 2 column table
inside the main table that I first spoke of. I am using CSS to put the
"our facilities table" margin-bottom 150px for it's positioning. I
figured I could just throw another table right under that and just use
CSS with the margin-bottom and put a different pixel value and it would
position it under that. Apparently that is not the case. I guess the
best thing to do woudl be to split the right column of the main table
into another table? I guess I'm trying to stay away from that because
I was on another group and they basically blasted me for using tables
so I thought using more tables in my structure was a bad thing.
Anyway, I dont know what the best thing to do is to acheive what I
want. I want to be able to put text or other pictures under where the
"facilities " box is. I hope this explains it a little better.
Consider me a newb when you write back. I appreciate any info you
could give. Thanks.

I took a look at the source, but I really couldn't see through all the
Javascript to tell what's going on with the HTML. Not a criticism, just a
fact.

A lot of people will jump on you for using tables to lay out a page. (Be
glad you weren't here four or five years ago when the battles between
"purists" and "deesyners" were going hot and heavy. ;) I agree using tables
purely for layout is not optimum, but since I do it myself I can't object too
loudly.

Anyway, stick with the principle of one item per table cell and you'll
save yourself a lot of grief. That way you can use CSS to fine-tune the
spacings for any item without messing up something else.

You should also think about getting rid of the spacer gifs and the
BGCOLOR statements in the tables. Doing that sort of thing with CSS will make
your pages much easier to maintain.

What you've got looks like a decent start though.

Best,

CPW
Aug 3 '06 #8

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

Similar topics

10
66050
by: Markus Ernst | last post by:
Hi I have a strange problem with vertical-align. The case can be viewed at http://www.brainput.info/geschichte.html. HTML code: <div id="bild"><img src="geschichte.gif" width="274" height="29" alt="Wir schreiben die Geschichte Ihres Unternehmens."></div>
2
5732
by: Newry | last post by:
Hi, I'm trying to position something with CSS, to have the equivalent of: <table> <tr> <td><img src="foo.jgp"></td> <td valign=bottom>Label</td> </tr> </table>
2
4285
by: Thomas Scheiderich | last post by:
Is there a way to make a section of a <td> tag to go to the bottom of the cell? Below is a portion of my page. The <td class="BodyText"> tag has a "vertical-align:top" in the css file to move the data to the top of the page. I would like to take the section below the repeater (label and radio buttons) and move them to the bottom of the cell.
2
4898
by: gee.sucka.foo | last post by:
I have a few thumbnail images each surrounded by a few links. So I put the thumbnail and the links in a div tag and set the div's to float:left. So my intent is to have the thumbnails wrap at the edge of the browser. Problem is the images are not all the same size and when an image wraps, it stops next to the first image that is taller. Here is some code: <div style="float:left"> <a href="#">link 1</a> <a href="#">link 2</a><br />
0
2297
by: laredotornado | last post by:
Hello, I'm trying to write TABLE-free HTML pages, but I'm having a problem with rewriting a particular block of code using DIVs and CSS. I want to align the "More" button at the bottom right of the block, which is a fixed height in pixels. However, there doesn't seem to be a "float:bottom right" attribute and "vertical-align:bottom" doesn't seem to work in the DIV of the below <table cellpadding="0"
3
4810
by: torbs | last post by:
Strange behaviour in ie7. A collegue of mine put several images into a page using JCE in Joomla. JCE have the option to align these images and he left aligned every single one - to create a string of images. In Firefox these img-elements breaked when then reached the border of the sorrounding div-element, i ie7 they continued. I removed the align- attribute and everything looking the same in both browsers. I haven't tested in ie6.
2
2490
by: vinit_mahajan99 | last post by:
Hello all, I want to align the images and controls at the bottom of a master page or at the right side. I tried to do it with the table but I was not successful. The image should be seen at the bottom of the page. Please reply....
2
16367
by: yangtono | last post by:
Hi, I am creating a table to list some data. The table is using a sorting and highlight function that I found from the net. I can't attach image here, basically html will wrap the heading, therefore I notice the second line of the header is left align instead of centering. I believe it's because of the sort.htc script that will output an arrow when user click on the header to sort. The code is as below: <TABLE width="100%">
40
5505
by: maya | last post by:
hi, how do I get text to vertical-align inside a div? http://www.mayacove.com/misc/home.html vertical-align should work, according to this: http://htmlhelp.com/reference/css/text/vertical-align.html
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10152
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7500
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2880
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.