473,804 Members | 3,822 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Vertical align two divs, w/o using tables?

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
12 12379
"Michael Ramey" <ra*****@spam.o rg> 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
"Michael Ramey" <ra*****@spam.o rg> 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
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

"Spartanicu s" <me@privacy.net > wrote in message
news:e8******** *************** *********@news. spartanicus.utv internet.ie...
"Michael Ramey" <ra*****@spam.o rg> 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
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

"Spartanicu s" <me@privacy.net > wrote in message
news:e8******** *************** *********@news. spartanicus.utv internet.ie...
"Michael Ramey" <ra*****@spam.o rg> 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
"Michael Ramey" <ra*****@spam.o rg> 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
"Michael Ramey" <ra*****@spam.o rg> 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
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
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
"Raterus" <ra*****@localh ost.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

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

Similar topics

0
759
by: Michael Ramey | last post by:
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...
2
12145
by: Eric Lindsay | last post by:
If I want to have the middle of an image vertically aligned with the middle of a heading (or several lines of heading), is there some particular way people would recommend? vertical-align: center looked made for that. The effect I want is img heading img heading img heading or heading
15
2267
by: scott | last post by:
Hello, I'm working on updating some of my table-based sites to use CSS instead of tables. One of my sites has a header that is composed of three elements: A B C In my prior design, this was done using a table. A, B, and C were each <tdelements.
18
7952
by: ~john | last post by:
Sorry if this is a dumb question buy my CSS is pretty bad... but how do I get text to center vertically within a div tag? Here's my code below... the text is displaying on the far top-right. I would like it far right centered vertically. #test { width: 100%; height: 55px; margin: 0 0 0 0;
5
4827
by: Markus Ernst | last post by:
Hello This is a test example: http://www.markusernst.ch/anthracite/ http://www.markusernst.ch/anthracite/living_divani.html After googling and experimenting for several hours, I ended up doing this demo with tables. The main problems are the vertical centering of the info area, and of the text inside the squares.
4
3301
by: O11Y | last post by:
Hello, I've read numerous posts & guides on this subject but i'm still having problems. I'm writing some HTML for the company intranet and all our browsers are currently (you guessed it) IE6. In most of the guides that I've read you can "fix" this problem in IE6 by nesting a series of divs inside each other and fiddling the margins. However this only seems to work when you know the size of the content you're putting in. It also seems to...
2
15574
by: esteuart | last post by:
I need to get the right combination for a div to clip any text inside and allow vertical alignment. I only have this problem in FireFox. I have 3 divs nested within each other. The outer div has display of table, the first inner div has display of table-cell and the inner-most div has the text. The outer div has a set width and height. So here's the problem: Without the inner divs having a width and height set, the overflow:hidden doesn't...
8
2821
by: Dave Rado | last post by:
Hi See my mock-up at http://tinyurl.com/35tv29. The three icons are supposed to be vertically aligned on their bottoms (using "vertical- align: bottom"), but they aren't, they're vertically aligned on their tops. Is there any way to align them vertically on their bottoms (or middle for that matter) short of resorting to using a table (where "vertical-align: bottom" does work)? Dave
40
5508
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
2
8256
Ciary
by: Ciary | last post by:
hi fellow coders, i'm not sure if this is the right place to ask since it's rather specific. i've got some questions using EXT JS. i've been asking on there forum but i didn't get a reply there.seems like their forum is rather lazy compared to bytes :) anyway, i'm trying to vertically position my text within my divs and doing this dynamically with a button. i figured out i needed to do this and i've done it using JS align: top <div...
0
9706
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
9579
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
10577
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10332
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...
1
10320
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10077
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...
0
9150
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7620
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...
1
4299
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.