473,659 Members | 2,922 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 2148
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******* ************@tw ister.socal.rr. com>
TJ <tj@getlostspam mers.com> said:
I'd like to do this:

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


#content{displa y:table;}
#imagethingy{wi dth:100px;verti cal-align:middle;di splay: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.s ocal.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.s ocal.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
23071
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 a h and w vairable that give me the height and width of the current image, but I can't seem to come up with a simple freaking formula to center the image vertically and horozontally. Thanks guys. fnFullView = function () { var h var w
1
8451
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;"> ...contents.explained.later... </td> ...
19
5732
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 vertical align doesn't work in Mozilla): http://zintel.com/homepics.html I've used combinations of <center>, style align 'center', table cell align, valign and height='100%' to get what I want, but I wonder if CSS can do it by itself.
27
9242
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
26868
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
1856
by: Wilhelm Kutting | last post by:
Hi i want to use the following layout: ----------------- | | | | Text line 1 | | | Text line 2 | image.jpg | | ... | | | | | |
40
4462
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 column has a background picture - right column has another background picture
0
2318
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 class=c7bg style="top:202px;left:585px;width:55px;height:30px;"> <div class=c7fg style="top:7px;left:2px;"> <table><tr>
2
2767
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 : "div.layout_img img" The image size is unknown I have tried to use the "margin:0px auto;" method with no success. I include the code here
0
8428
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
8335
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
8851
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...
1
8528
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
7356
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
6179
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
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1976
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
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.