Reply
Best way to align 2 html elements?
Old 04-10-2006, 05:47 PM Best way to align 2 html elements?
Novice Talker

Posts: 12
I have an input and an img tag ... what would be the best way to align these 2 elements?

Code:
<input ... /><img ... />
__________________
»»» KenA.
KenA is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 04-10-2006, 05:52 PM Re: Best way to align 2 html elements?
jyoz22's Avatar
Extreme Talker

Posts: 242
Location: Orlando, FL
i always align="absmiddle" for my images.

(Not sure if you mean align horizontally or vertically)
__________________
Jyoz
jyoz22 is offline
Reply With Quote
View Public Profile
 
Old 04-10-2006, 06:31 PM Re: Best way to align 2 html elements?
amygdela's Avatar
Super Talker

Posts: 112
joyz22 that is HTML, you are now in the CSS forum

@KenA: Align horizontal or vertical?
amygdela is offline
Reply With Quote
View Public Profile
 
Old 04-10-2006, 06:34 PM Re: Best way to align 2 html elements?
Novice Talker

Posts: 12
Hi ... it´s vertical alignment ... joyz22´s solution works fine, although it may have a css way for this.
__________________
»»» KenA.
KenA is offline
Reply With Quote
View Public Profile
 
Old 04-11-2006, 03:41 AM Re: Best way to align 2 html elements?
amygdela's Avatar
Super Talker

Posts: 112
<input id="bla">blabla</input>

Code:
#bla {
float: left;
vertical-align: middle;
}
<img src="bla.gif" id="imgbla" />

Code:
#imgbla {
float: left;
vertical-align: middle;
line-height: HEIGHT OF YOUR IMAGE!;
}
That should do the trick I reckon...
amygdela is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Best way to align 2 html elements?
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12396 seconds with 13 queries