473,786 Members | 2,672 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

images and text not aligning

In VS 2008, I have in my footer a button, link and 2 images.

But they are not displaying in the vertical middle of the row, even though I
have it set that way:

<asp:Button ID="AddQuestion " Text="Add Question" runat="server"
CommandName="Ad dRow" CommandArgument ="AddRow" style="
vertical-align:middle"></asp:Button>

<div style="vertical-align:middle; text-align:right">

<asp:linkButt on id="deselect" visible="true" text="Deselect Row"
CommandName="De select" style="vertical-align:middle"
OnClick="Desele ctQuestionsRow" runat="server"/>&nbsp;&nbsp;&n bsp;&nbsp;

<asp:ImageButto n ID="UpQuestion " visible="true" runat="server"
ImageUrl="~/images/arrowUp.gif" style="height:1 6px;width:16px;
vertical-align:middle" CommandName="Up " OnClick="moveQu estionRowUp"
AlternateText=" ^"/>&nbsp;

<asp:ImageButto n ID="DownQuestio n" visible="true" runat="server"
ImageUrl="image s/arrowDown.gif" style="height:1 6px;width:16px;
vertical-align:middle" CommandName="Do wn" OnClick="moveQu estionRowDown"
AlternateText=" v"/>

</div>

The button is at the top and the others are on the bottom.

Why is that, since I have everthing set to "vertical-align:middle"?

Thanks,

Tom
Sep 16 '08 #1
1 4425
you are confusing how the align works with containers and elements. with a
div (a container) an align defines how its content is aligned. with a inline
element like an anchor, its meanless. with a block element (like a button or
image), it specifies how its aligned within the text flow (baseline). so you
have

<input type=button>
<div>
<a>some text</a><img><imagebu tton><imagebutt on>
</div>

the button goes first. the div is a block content, so it starts on its own
line. the anchor is a flow element, so it defines a baseline, which will be
the highest of the image or text. the images are vertially aligned in the
baseline in the flow. if the div is wide enough there will only be one line.
the extra space on the line goes to the front (right align)
-- bruce (sqlwork.com)
"tshad" wrote:
In VS 2008, I have in my footer a button, link and 2 images.

But they are not displaying in the vertical middle of the row, even though I
have it set that way:

<asp:Button ID="AddQuestion " Text="Add Question" runat="server"
CommandName="Ad dRow" CommandArgument ="AddRow" style="
vertical-align:middle"></asp:Button>

<div style="vertical-align:middle; text-align:right">

<asp:linkButt on id="deselect" visible="true" text="Deselect Row"
CommandName="De select" style="vertical-align:middle"
OnClick="Desele ctQuestionsRow" runat="server"/>

<asp:ImageButto n ID="UpQuestion " visible="true" runat="server"
ImageUrl="~/images/arrowUp.gif" style="height:1 6px;width:16px;
vertical-align:middle" CommandName="Up " OnClick="moveQu estionRowUp"
AlternateText=" ^"/>

<asp:ImageButto n ID="DownQuestio n" visible="true" runat="server"
ImageUrl="image s/arrowDown.gif" style="height:1 6px;width:16px;
vertical-align:middle" CommandName="Do wn" OnClick="moveQu estionRowDown"
AlternateText=" v"/>

</div>

The button is at the top and the others are on the bottom.

Why is that, since I have everthing set to "vertical-align:middle"?

Thanks,

Tom
Sep 16 '08 #2

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

Similar topics

1
2438
by: Graham Cross | last post by:
Dear All Is there an HTML way of aligning the images on this page http://www.ageconcernleics.com/review03/chairs03.html so that they appear evenly spaced relative to the text column on the left. In a perfect world I would like the top of the first photo to be aligned with the first line of text. Thanks
1
2340
by: steve | last post by:
Hello, I'm reworking our company site, trying to do it without tables. It's been a bit of an... adventure. Site is starting to come along. Problem I've run into is aligning image input buttons with form elements. I'm sure there's an obvious reason but I can't figure out how to do so. Seems any image within the <form></form> are being bumped upward 4-6 pixels or so.
15
15963
by: A.Translator | last post by:
From what I read, aligning images vertically in a div is not easy. It proofed too difficult for me: I tried to align the "control buttons" on the right hand side of the main nav bar by vertically alignign the container div (#playPanel)to "middle" - but it is no good. Can someone please point me in the right direction? I would be very grateful.
1
1925
by: Linux Boy via .NET 247 | last post by:
(Type your message here) Hi everyone, I would like to ask a question about aligning text within one label. I have an application that everytime the user click on Enter Record button, they will be prompt an input box to enter employee names and sales figures. The output then will be displyed in only 1 label using a For loop. The layout would be under 3 columns: Employee name (left justified), Sale figures (right justified) and Bonus...
10
2368
by: Neo Geshel | last post by:
I am seeking to hand-roll my own blog in ASP.NET 2.0 and SQLExpress 2005. Why? Because I can. Because I will gain experience. The one thing that has me stumped at square one is inline images. That is, images inline with the actual content of the blog itself. Is there an example that I can be pointed to, where I can examine some code and figure out how to do this? Frankly I haven't got a clue, aside from breaking the content up into...
5
3242
by: camphor | last post by:
hi and happy new year I am using the css float tag to align all my images but some of the images are not the same width, I am using a liquid layout but am having trouble aligning them properly on the page, here are the css and html div.float {float: left; width: 125px; padding: 10px; margin: 25px;} <div class="float"> <a href="../images/times%20mag%20aug%202003%20big.png"><img src="../images/times mag aug 2003 small.png" alt="The Times...
3
2058
by: daveo1001 | last post by:
I've sliced up a nice little nav bar that kind of makes a C shape around my text on the page. There is a top right image, at top left, a left, a bottom left and a bottom right. They are all in their own cell in a table. Between the top left and top right image there is a 1px gap that only shows up in IE; firefox doesn't have a problem with it. I've got paddings and margins on 0px. I've tried left aligning the right image and right aligning the...
2
2490
by: vinit_mahajan99 | last post by:
Hello all, I want to align the images and controls at the bottom of a master page or at the right side. I tried to do it with the table but I was not successful. The image should be seen at the bottom of the page. Please reply....
1
1741
by: donpro | last post by:
Hi, I have the following code snippet: <div id="header_menuitems"> <a href="home" title="Home page">Home</a| <a href="aboutus" title="About Us">About Us</a| <a href="contactus" title="Contact Us">Contact Us</a| <a href="home" title="Login">Login</a> </div>
0
10363
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
10164
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
10110
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
9962
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
8992
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
7515
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
6748
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5398
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2894
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.