473,396 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

vertical alignment of img inside a div?

Dear NG-Users,

[1] I would like to vertically center the images containing arrows
when the content area is stretched because the user chooses a bigger
font. although I explored many methods in the net to achieve this,
none of them worked.
[2] Additionally IE seems to have problems with the float-property I
used to position the text between the two arrow-images.

I would like not to use background images because I want to achieve a
rollover-effect when hovering over them.

Here's the example site: http://tomasio.at/temp/liquid.html
and here's the regarding CSS: http://tomasio.at/temp/stylesheet.css

and here is how it should look like when the text extends beyond the
height of the images: http://tomasio.at/temp/correct.png

Any help will be appreciated.
Jun 13 '06 #1
8 1604
To further the education of mankind, tomasio <fr*********@bled.de>
vouchsafed:
Dear NG-Users,

[1] I would like to vertically center the images containing arrows
when the content area is stretched because the user chooses a bigger
font. although I explored many methods in the net to achieve this,
none of them worked.
[2] Additionally IE seems to have problems with the float-property I
used to position the text between the two arrow-images.

I would like not to use background images because I want to achieve a
rollover-effect when hovering over them.

Here's the example site: http://tomasio.at/temp/liquid.html
and here's the regarding CSS: http://tomasio.at/temp/stylesheet.css

and here is how it should look like when the text extends beyond the
height of the images: http://tomasio.at/temp/correct.png

Any help will be appreciated.


With other necessary styling, you can position the images at 50% of the
height of the container (top:50%;) and negative top-margin them half of
their height.

--
Neredbojias
Infinity has its limits.
Jun 14 '06 #2
On Wed, 14 Jun 2006 01:57:38 -0400, Neredbojias
<http://www.neredbojias.com/fliam.php?cat=alt.html> wrote:
To further the education of mankind, tomasio <fr*********@bled.de>
vouchsafed:
Dear NG-Users,

[1] I would like to vertically center the images containing arrows
when the content area is stretched because the user chooses a bigger
font. although I explored many methods in the net to achieve this,
none of them worked.
[2] Additionally IE seems to have problems with the float-property I
used to position the text between the two arrow-images.

I would like not to use background images because I want to achieve a
rollover-effect when hovering over them.

Here's the example site: http://tomasio.at/temp/liquid.html
and here's the regarding CSS: http://tomasio.at/temp/stylesheet.css

and here is how it should look like when the text extends beyond the
height of the images: http://tomasio.at/temp/correct.png

Any help will be appreciated.


With other necessary styling, you can position the images at 50% of the
height of the container (top:50%;) and negative top-margin them half of
their height.

Hi Neredbojas,

I tried the solution styling the container the way you suggested to me
with the result that the contained img is only 50% viewable. You can
look after it at http://tomasio.at/temp/liquid2.html.

What _other_ necessary styling should I add? Does it maybe have to do
with declaring <img> as block element in my external stylesheet? I did
it because I had imgs smaller than the default font-size. Or with the
float-property? I eliminated both of them, but it did not have any
effect on the img position :.(

Thank you again for your help.
Jun 14 '06 #3
tomasio <fr*********@bled.de> schrieb:
On Wed, 14 Jun 2006 01:57:38 -0400, Neredbojias
<http://www.neredbojias.com/fliam.php?cat=alt.html> wrote:
To further the education of mankind, tomasio <fr*********@bled.de>
vouchsafed:
Dear NG-Users,

[1] I would like to vertically center the images containing arrows
when the content area is stretched because the user chooses a bigger
font. although I explored many methods in the net to achieve this,
none of them worked.
[2] Additionally IE seems to have problems with the float-property I
used to position the text between the two arrow-images.

I would like not to use background images because I want to achieve a
rollover-effect when hovering over them.

Here's the example site: http://tomasio.at/temp/liquid.html
and here's the regarding CSS: http://tomasio.at/temp/stylesheet.css

and here is how it should look like when the text extends beyond the
height of the images: http://tomasio.at/temp/correct.png

Any help will be appreciated.

I just found out that [2] has something to do with the width of the
containing div (cont-dyn): Setting its width to 808px or more will
allow the content to flow correctly. Naturally that's not what I want
because the layout will crash then.

Does anybody has an idea how to get that centering issue[1] and that
thing with the float property[2] working correctly?

Please help, I am a little desparate already *grn*
--
kind regards,
tomasio
"describing an issue reveals the way to solve it"
Jun 14 '06 #4
To further the education of mankind, tomasio <fr*********@bled.de>
vouchsafed:
With other necessary styling, you can position the images at 50% of the
height of the container (top:50%;) and negative top-margin them half of
their height.

Hi Neredbojas,

I tried the solution styling the container the way you suggested to me
with the result that the contained img is only 50% viewable. You can
look after it at http://tomasio.at/temp/liquid2.html.

What _other_ necessary styling should I add? Does it maybe have to do
with declaring <img> as block element in my external stylesheet? I did
it because I had imgs smaller than the default font-size. Or with the
float-property? I eliminated both of them, but it did not have any
effect on the img position :.(


I think the problem is that your container does not have a well-established
height because the content is floated. In order for my suggested procedure
to work, the height must be obtainable. I did make a simple mock-up and
both position:absolute; and position:relative; functioned as stated. Ergo,
some re-designing will be necessary if you wish to do this.

--
Neredbojias
Infinity has its limits.
Jun 15 '06 #5
On Thu, 15 Jun 2006 00:19:40 -0400, Neredbojias
<http://www.neredbojias.com/fliam.php?cat=alt.html> wrote:
To further the education of mankind, tomasio <fr*********@bled.de>
vouchsafed:
With other necessary styling, you can position the images at 50% of the
height of the container (top:50%;) and negative top-margin them half of
their height.

Hi Neredbojas,

I tried the solution styling the container the way you suggested to me
with the result that the contained img is only 50% viewable. You can
look after it at http://tomasio.at/temp/liquid2.html.

What _other_ necessary styling should I add? Does it maybe have to do
with declaring <img> as block element in my external stylesheet? I did
it because I had imgs smaller than the default font-size. Or with the
float-property? I eliminated both of them, but it did not have any
effect on the img position :.(


I think the problem is that your container does not have a well-established
height because the content is floated. In order for my suggested procedure
to work, the height must be obtainable. I did make a simple mock-up and
both position:absolute; and position:relative; functioned as stated. Ergo,
some re-designing will be necessary if you wish to do this.


Please, could you be so kind to show me what you've done? Maybe paste
the code here or give me a link to your mock-up? I gave the floated
container (cont-back) a height-value, and the result is as shown here:
http://tomasio.at/temp/liquid2.html
Jun 15 '06 #6
To further the education of mankind, tomasio <fr*********@bled.de>
vouchsafed:
I think the problem is that your container does not have a
well-established height because the content is floated. In order for
my suggested procedure to work, the height must be obtainable. I did
make a simple mock-up and both position:absolute; and
position:relative; functioned as stated. Ergo, some re-designing will
be necessary if you wish to do this.


Please, could you be so kind to show me what you've done? Maybe paste
the code here or give me a link to your mock-up? I gave the floated
container (cont-back) a height-value, and the result is as shown here:
http://tomasio.at/temp/liquid2.html


Here's an "out-take" demonstrating the method:

http://www.neredbojias.com/zyxix/liquidIIb.html
--
Neredbojias
Infinity has its limits.
Jun 15 '06 #7
Neredbojias <http://www.neredbojias.com/fliam.php?cat=alt.html>
schrieb:
To further the education of mankind, tomasio <fr*********@bled.de>
vouchsafed:
I think the problem is that your container does not have a
well-established height because the content is floated. In order for
my suggested procedure to work, the height must be obtainable. I did
make a simple mock-up and both position:absolute; and
position:relative; functioned as stated. Ergo, some re-designing will
be necessary if you wish to do this.


Please, could you be so kind to show me what you've done? Maybe paste
the code here or give me a link to your mock-up? I gave the floated
container (cont-back) a height-value, and the result is as shown here:
http://tomasio.at/temp/liquid2.html


Here's an "out-take" demonstrating the method:

http://www.neredbojias.com/zyxix/liquidIIb.html


Wohooo! Made it finally because of your help. The way you avoided to
use the float-property is admirable for a CSS-Rookie like me. Here is
a working example (Navigation and Links are only Template-imgs):
http://tomasio.at/temp/Us_Templ.html
--
kind regards,
tomasio
"describing an issue reveals the way to solve it"
Jun 16 '06 #8
To further the education of mankind, tomasio <da****@jan.et> vouchsafed:
Wohooo! Made it finally because of your help. The way you avoided to
use the float-property is admirable for a CSS-Rookie like me. Here is
a working example (Navigation and Links are only Template-imgs):
http://tomasio.at/temp/Us_Templ.html


Looking pretty good, bud. Css takes practice and patience, just like most
anything else. And it isn't perfect, either.

--
Neredbojias
Infinity has its limits.
Jun 17 '06 #9

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

Similar topics

8
by: abracad | last post by:
Hi Is it possible to vertically align an image in the middle of a DIV of fixed height?
10
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"...
1
by: Kenneth | last post by:
Okay, I've been scouring Google for hours looking for a solution to this problem, but as of yet I can't find one. XHTML Transitional seems to specify that I can no longer set a table's height to...
18
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...
11
by: C.W.Holeman II | last post by:
I what to hide an input element and the following text. I have the selector for the input working and just need to grab the text following it. CSS: form{ display:table; text-align:center; }
4
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. ...
2
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...
8
by: ayamopamo | last post by:
Hi- I am trying to center a web page. It seems like this should be very simple to do, but apparently it isn't my day. I have successfully centered the background by calling it in the css body tag:...
13
by: Bill | last post by:
Hi How can I have IE7 act correctly on that ? The rules make the link text go down when hovered. It works in FF , I had to add a hard space right after the LI tag to have OP9 work but I can't...
40
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:...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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,...
0
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...
0
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...

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.