By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,790 Members | 1,107 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,790 IT Pros & Developers. It's quick & easy.

Vertical align two divs, w/o using tables?

P: n/a
Hi,

I've have two divs, that are laid out side-by-side. (I'm floating the first
div to the left) I need to set up css on these two divs so that the second
div is vertically aligned to the first one (in the middle). How can I go
about doing this?, both divs contain textual elements and I won't easily
know the heights, so absolute positioning is out. I've also tried using the
vertical-align selector to no avail. I'm trying to find a way
without using an html table, because I know I can get it to work great with
those, but I'm trying to block that mentality right now, but if it is the
best way, please tell me!

Thanks,
--Michael

Jul 20 '05 #1
Share this Question
Share on Google+
12 Replies


P: n/a
"Michael Ramey" <ra*****@spam.org> wrote:
I've have two divs, that are laid out side-by-side. (I'm floating the first
div to the left) I need to set up css on these two divs so that the second
div is vertically aligned to the first one (in the middle). How can I go
about doing this?


Works fine here, url?

--
Spartanicus
Jul 20 '05 #2

P: n/a
"Michael Ramey" <ra*****@spam.org> wrote:
I've have two divs, that are laid out side-by-side. (I'm floating the first
div to the left) I need to set up css on these two divs so that the second
div is vertically aligned to the first one (in the middle). How can I go
about doing this?


Works fine here, url?

--
Spartanicus
Jul 20 '05 #3

P: n/a
Yeah, that probably would help, I failed to mention I have divs inside these
two divs.

http://www.ncfunds.com/tnc.html

You'll see what I mean when you look at this, vertically align the text part
on the right with the logo part on the left. (So the text won't appear off
balance from the logo).

Thanks,
--Michael

"Spartanicus" <me@privacy.net> wrote in message
news:e8********************************@news.spart anicus.utvinternet.ie...
"Michael Ramey" <ra*****@spam.org> wrote:
I've have two divs, that are laid out side-by-side. (I'm floating the firstdiv to the left) I need to set up css on these two divs so that the seconddiv is vertically aligned to the first one (in the middle). How can I go
about doing this?


Works fine here, url?

--
Spartanicus

Jul 20 '05 #4

P: n/a
Yeah, that probably would help, I failed to mention I have divs inside these
two divs.

http://www.ncfunds.com/tnc.html

You'll see what I mean when you look at this, vertically align the text part
on the right with the logo part on the left. (So the text won't appear off
balance from the logo).

Thanks,
--Michael

"Spartanicus" <me@privacy.net> wrote in message
news:e8********************************@news.spart anicus.utvinternet.ie...
"Michael Ramey" <ra*****@spam.org> wrote:
I've have two divs, that are laid out side-by-side. (I'm floating the firstdiv to the left) I need to set up css on these two divs so that the seconddiv is vertically aligned to the first one (in the middle). How can I go
about doing this?


Works fine here, url?

--
Spartanicus

Jul 20 '05 #5

P: n/a
"Michael Ramey" <ra*****@spam.org> wrote:

Please don't top post, corrected this once. Kindly also configure your
news reader so that it doesn't mangle quotes.
>I've have two divs, that are laid out side-by-side. (I'm floating thefirst >div to the left) I need to set up css on these two divs so that thesecond >div is vertically aligned to the first one (in the middle). How can I go
>about doing this?
Works fine here, url?

Yeah, that probably would help, I failed to mention I have divs inside these
two divs.

http://www.ncfunds.com/tnc.html
Why are you suing such a convoluted way to construct a logo, what's
wrong with using an image? Have you checked in any other browser than
IE? (try viewing it in Opera or Mozilla)
You'll see what I mean when you look at this
I don't, the "logo" and the text are displayed next to each other.
vertically align the text part
on the right with the logo part on the left. (So the text won't appear off
balance from the logo).


Are we supposed to know what you consider "off balance"?

--
Spartanicus
Jul 20 '05 #6

P: n/a
"Michael Ramey" <ra*****@spam.org> wrote:

Please don't top post, corrected this once. Kindly also configure your
news reader so that it doesn't mangle quotes.
>I've have two divs, that are laid out side-by-side. (I'm floating thefirst >div to the left) I need to set up css on these two divs so that thesecond >div is vertically aligned to the first one (in the middle). How can I go
>about doing this?
Works fine here, url?

Yeah, that probably would help, I failed to mention I have divs inside these
two divs.

http://www.ncfunds.com/tnc.html
Why are you suing such a convoluted way to construct a logo, what's
wrong with using an image? Have you checked in any other browser than
IE? (try viewing it in Opera or Mozilla)
You'll see what I mean when you look at this
I don't, the "logo" and the text are displayed next to each other.
vertically align the text part
on the right with the logo part on the left. (So the text won't appear off
balance from the logo).


Are we supposed to know what you consider "off balance"?

--
Spartanicus
Jul 20 '05 #7

P: n/a
The first thing I thought when I heard the assignment was to use a picture,
but the boss man wants our logo presented like this, so that's what he's
going to get. It's for a signature in an email, and we don't want a hit to
our webserver every time someone reads their email.

The text in the right div that has the contact information is stuck at the
top, I want it in the center, vertically aligned to the logo. Moved down,
say 10 pixels (but I don't want to directly specify how far to move it down,
I just want to specify that it is to be vertically centered to the div
floated to the left of it)

so instead of this

blah blah
blah
blah

it would be..

blah
blah blah
blah
Jul 20 '05 #8

P: n/a
The first thing I thought when I heard the assignment was to use a picture,
but the boss man wants our logo presented like this, so that's what he's
going to get. It's for a signature in an email, and we don't want a hit to
our webserver every time someone reads their email.

The text in the right div that has the contact information is stuck at the
top, I want it in the center, vertically aligned to the logo. Moved down,
say 10 pixels (but I don't want to directly specify how far to move it down,
I just want to specify that it is to be vertically centered to the div
floated to the left of it)

so instead of this

blah blah
blah
blah

it would be..

blah
blah blah
blah
Jul 20 '05 #9

P: n/a
"Raterus" <ra*****@localhost.com> wrote:
The first thing I thought when I heard the assignment was to use a picture,
Who are you? Related to the OP?

If you follow up, please quote a relevant snippet of what you are
replying to above your follow up.
but the boss man wants our logo presented like this, so that's what he's
going to get.
You've lost me, why would using an image restrict your options on how it
should look?
It's for a signature in an email, and we don't want a hit to
our webserver every time someone reads their email.


So? Send the image with the email.

--
Spartanicus
Jul 20 '05 #10

P: n/a
"Raterus" <ra*****@localhost.com> wrote:
The first thing I thought when I heard the assignment was to use a picture,
Who are you? Related to the OP?

If you follow up, please quote a relevant snippet of what you are
replying to above your follow up.
but the boss man wants our logo presented like this, so that's what he's
going to get.
You've lost me, why would using an image restrict your options on how it
should look?
It's for a signature in an email, and we don't want a hit to
our webserver every time someone reads their email.


So? Send the image with the email.

--
Spartanicus
Jul 20 '05 #11

P: n/a
Thanks anyway, I'll look elsewhere if all you can provide is criticism.
Jul 20 '05 #12

P: n/a
Thanks anyway, I'll look elsewhere if all you can provide is criticism.
Jul 20 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.