473,503 Members | 1,188 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

vertically center an image on the left of a column with multiple rows?

TJ
I'd like to do this:

------------------
|-------------
XX |-------------
|-------------
------------------

This is a navigation header with an icon. Each row will have text.

Issue:
If there is fixed size text in those rows, then when the user "enlarges" the
text using his browser, that I'd like the image to become recentered
between the top and bottom line

I'll post my sample in a few hours...

Thanks,
Jul 20 '05 #1
8 2141
TJ
Significant notes:
1. I plan to have the icon file be determined by the user (the icon
corresponds to the page that the user is on)... so a simple background
image, I think, will not exactly be correct the way I understand it.

??
Jul 20 '05 #2
in post: <news:8r*******************@twister.socal.rr.com >
TJ <tj@getlostspammers.com> said:
I'd like to do this:

------------------
|-------------
XX |-------------
|-------------
------------------


#content{display:table;}
#imagethingy{width:100px;vertical-align:middle;display:table-cell;}

<div id="content">
<div id="imagethingy"><img 100px...></div>
</div>

not supported by IE

--
b r u c i e
Jul 20 '05 #3
TJ wrote:
I'd like to do this:

------------------
|-------------
XX |-------------
|-------------
------------------

This is a navigation header with an icon. Each row will have text.

Issue:
If there is fixed size text in those rows, then when the user "enlarges" the
text using his browser, that I'd like the image to become recentered
between the top and bottom line


Like on of these?
http://tranchant.plus.com/tmp/navicon

--
Mark.
Jul 20 '05 #4
TJ wrote:
Significant notes:
1. I plan to have the icon file be determined by the user (the icon
corresponds to the page that the user is on)... so a simple background
image, I think, will not exactly be correct the way I understand it.


If you use different id attributes for different pages, and vary the
background for each id. The example given:
<http://tranchant.plus.com/tmp/navicon> uses this:

..blah {
background-image: url(/computing/graphics/images/pixels);
background-position: 0% 50%;
background-repeat: no-repeat;
}

<div class="blah">
<p>Lorem ipsum...</p>
</div>

Instead, use this:

<div class="blah" id="home">
<p>Lorem ipsum...</p>
</div>

<div class="blah id="products">
<p>Lorem ipsum...</p>
</div>

..blah {
background-image: url(/computing/graphics/images/pixels); /*the default,
if no id is specified */
background-position: 0% 50%;
background-repeat: no-repeat;
}

#home {
background-image: url(elsewhere);
}

#products {
background-image: url(etc);
}

--
Matt
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 20 '05 #5
TJ
Fantastic!
--
TJ
Jul 20 '05 #6
TJ
Thats it!

--
TJ
Jul 20 '05 #7
TJ wrote in
<eg*****************@twister.socal.rr.com>
Thats it!


No, it's not.

--
PeterMcC
If you feel that any of the above is incorrect,
inappropriate or offensive in any way,
please ignore it and accept my apologies.
Jul 20 '05 #8
PeterMcC wrote:
TJ wrote in
<eg*****************@twister.socal.rr.com>
Thats it!


No, it's not.


Did I make a mistake?

--
Matt
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 20 '05 #9

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

Similar topics

4
23062
by: Tony Vasquez | last post by:
Can somoene give me an example of how to center a div, according to it's image size... I am using different images, and so I have to resize it in a functino according to the image's size. So I use...
1
8445
by: Kai Grossjohann | last post by:
I have a table which contains a top-aligned table cell: .... <tr style="height:40"> ... <td colspan="1" rowspan="2" align="left" valign="top" style="overflow:hidden;">...
19
5715
by: George Ziniewicz | last post by:
.. I try to use CSS when possible, though I am still learning and don't maximize its use. In particular, I still use a table to provide for a centered image in a few slideshows (though table...
27
9209
by: FL | last post by:
Hi Everyone, I know howto center a block using margin-left: auto ; margin-right: auto ; but I'm trying to center vertically a box, any idea to solve this?
10
26847
by: john T | last post by:
Is there anyway to vertically center a html table using css in such a way it does not alter the html table. When I tryied it just screws up.
5
1847
by: Wilhelm Kutting | last post by:
Hi i want to use the following layout: ----------------- | | | | Text line 1 | | | Text line 2 | image.jpg | | ... | | | | | |
40
4421
by: Mark | last post by:
Hello i like to make the following lay out: - 3 columns - center column = fixed width - left and right columns are not fixed and must take all the available space there is left. - left...
0
2298
by: pamelafluente | last post by:
Hello experts, I need some help to do in a proper way what I am doing. I have some "cells" in a web page. Each "cell" is made of 2 DIV. One is inside the other. Example with 2 "cells" : <div...
2
2751
by: jerrygadd | last post by:
Can some body help me vertically center an image using CSS? The customer only uses IE, and so the code is not debugged for other browsers! The image in question is found on line 1075 :...
0
7203
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,...
0
7089
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...
0
7339
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...
1
6995
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...
0
7463
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...
1
5017
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...
0
4678
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...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1515
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 ...

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.