473,385 Members | 1,907 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,385 software developers and data experts.

problem with vertical centering an image

ASP.NET 2.0

The code below doesn't vertically center the image within the div, what am I
missing??

<div style="background-color:Green; width:210px; height:230px;
text-align:center; vertical-align:middle;">
<asp:Image ID="imgProfile" runat="server" Height="220px"
Width="200px" />
</div>

I've also tryed this:
<div style="background-color:Green; width:210px; height:230px;
padding:5px;">
<asp:Image ID="imgProfile" runat="server" Height="220px"
Width="200px" />
</div>
Which doesn't work either.

I did this on IE7

Any suggestions??
May 14 '07 #1
1 1708
On May 14, 11:57 pm, "Jeff" <it_consulta...@hotmail.com.NOSPAMwrote:
ASP.NET 2.0

The code below doesn't vertically center the image within the div, what am I
missing??

<div style="background-color:Green; width:210px; height:230px;
text-align:center; vertical-align:middle;">
<asp:Image ID="imgProfile" runat="server" Height="220px"
Width="200px" />
</div>

I've also tryed this:
<div style="background-color:Green; width:210px; height:230px;
padding:5px;">
<asp:Image ID="imgProfile" runat="server" Height="220px"
Width="200px" />
</div>
Which doesn't work either.

I did this on IE7

Any suggestions??
line-height:230px

May 15 '07 #2

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

Similar topics

15
by: Garmt de Vries | last post by:
I would have guessed that this issue had been discussed to death, but I couldn't find an answer to my problem in the ciwas archives. So, at the risk of asking something trivial, here goes: I...
4
by: Mimo Zus | last post by:
I'm hoping that someone can explain what's going on; better yet provide a workaround. I'm designing a centered CSS site based on a 550 pixel wide vertical background image. Onto this background...
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...
3
by: Wayfarer | last post by:
I *HAVE* Googled the hell out of it, but there's nothing I can understand (in words of one syllable or less) that works for me. If you go to http://www.journeys.ws/layout.html, on the...
2
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...
5
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...
1
by: sravani1 | last post by:
This code runs like when i submit the form it takes the image and displayed and top of the image a map will displayed. But actually i want that when i give the image it checks the location in the map...
19
by: Jim | last post by:
Hi, I have two questions/problems pertaining to CSS horizontal dropdown menus and am hoping that someone here can help me out. (1) I'm having a problem centering the menu. I picked up the...
14
by: Jim Moe | last post by:
On 10/12/08 07:41 am, Daniel Kaplan wrote: Align the text and image with what? The markup (which is invalid) you provided told me very little, especially since there was no text in the example. An...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...

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.