HTML - Align Text In Middle Next To Image
1st time post and an amatuer with no formal teaching of html.
I have placed an image on my web page and i want the text i enter to center itself next to the image. I have used align="Center" or Align="middle" and it does that perfectly for the 1st line of text. The issue is when the text spills over to the next line it goes under the image. I have tried a <br /> after the last word of the lines and that did nothing. How can I get all the lines to be centered? Centered meaning from top to bottom not side to side. Thanks, Cardgunner Similar TutorialsI have my Introduction with the title and all. Then i want my href links on the left side of the picture. However i can't seem to be able to do it.(this is a type of autobiographical site for web design, i am making it as a joke to the current assignment. HOWEVER my teacher isn't able to assist me with this...) Ok here is my code <html> <head> <title>A web site about nothing but video games</title> </head> <body> <h1 align="Center">Chairman of the world</h1> <h4 align="center">This is a site dedicated to Chairman Tide Oo</h4> <hr noshade="1"> <center> <img align="middle" src="http://www.dimensionsguide.com/wp-content/uploads/2009/11/Orange.jpg"> </center> <a href="_" >Link 1</a> <p>Yes and yes</p> <a href="_">Link 2</a> <p>Why not </p> <a href="_">Link 3</a> <p>Why yes </p> <a href="_">Link 4</a> <p>Ye...no?</p> <a href="_">Link 5</a> <p>YES!</p> <hr noshade="1"> </body> </html> Thank you~ Hi I am trying to make the image "y.bmp" and the text "Yahoo" and the other text ">" in the middle (vertically) I tried "vertical-align: middle" but does not work may someone please help me here. here is my html thanks HTML Code: <div style="width: 100%;"> <table cellspacing="0" cellpadding="0" style="width: 100%;"> <tr style="height: 76px; width: 100%; background-image: url('rep.bmp'); background-repeat: repeat-x;"> <td> <a style="display: block; height: 100%; width: 100%; vertical-align: middle;" href="http://www.yahoo.com"> <img style="" src="y.bmp" />Yahoo!</a> </td> <td align="right"> <a style="display: block; height: 100%; width: 100%; vertical-align: middle;" href="http://www.yahoo.com"> ></a> </td> </tr> <tr style="height: 76px; width: 100%; background-image: url('rep.bmp'); background-repeat: repeat-x;"> <td> <a style="display: block; height: 100%; width: 100%; vertical-align: middle;" href="http://www.google.com"> <img src="g.bmp" />Google</a> </td> <td align="right"> <a style="display: block; height: 100%; width: 100%; vertical-align: middle;" href="http://www.google.com"> ></a> </td> </tr> </table> </div> Can someone please tell me how to center an iframe vertically on a page. I am feeling really stupid right now that I can't get it. I've tried a few different things and it's not budging!!!! Please help - thanks! Hi, I have problem with XHTML CSS vertical align middle. It works with Firefox but not with IE6. Many people has IE6 still so I need to get it to work. HTML Code: <div style="height: 128px;">text</div> How would I middle vertical align the text? HTML Code: <div id="table_small"><div id="table_vm">Special Offer</div></div> HTML Code: #table_small { background-image: url('images/table.jpg'); width: 128px; height: 22px; border: 1px solid #5a5a5a; font-family: Verdana; font-size: 10px; color: #e0e0e0; text-align: center; display: table; } #table_vm { display: table-cell; vertical-align: middle; } this is SO easy - except for me.. how do i align this image to the top of the page - i am using CSS for the text but not for the image by the way.. thanks for your help.. sandy http://www.thebollocks.org/drop/rugged/taylor.html Hi I'm still a newbie to HTML coding hence i would most appreciate your assistance. I'm writing a few articles for my site and making use of images in my pieces. However, i'm having alot of problems aligning the caption just right in the middle under the image. I would also like to add a hyperlink to the caption to open in a new window. I've tried numerous tutorials on the web but still cant get it. Would most appreciate some advice. Thank you How come this code: <img src="tick.gif" alt="+" width="15" height="15" />This is a test, etc. ...puts the image on one line, with the text "This is a test, etc." beneath it? I want the text to be on the same line as the image. (Prob. occurs with IE and FF.) Any ideas? Cheers, James Hi there I'm pretty new to HTML, and am really stuck, and if anyone could point me in the right direction that would be awesome! I am trying align text on the left and right sides on the same line, and in between two single boarder lines (top and bottom). I have read up that using a float works which it has, but I am having trouble getting it to sit in between two lines that I have created and in the correct formatting. Below is my code and you should see what I mean...the text is currently sitting unformatted, and underneath the two lines, rather than formatted and inbetween the two lines. Any pointers would be appreciated Thanks, J </tr> </tbody></table> <table border="0" cellpadding="0" cellspacing="0"> <tbody><tr> <td style="padding-left: 40px;" width="610"><p style="border-top: 1px solid rgb(186, 186, 186); border-bottom: 1px solid rgb(186, 186, 186); padding-top: 4px; padding-bottom: 4px; font-family: Arial,Helvetica,sans-serif; font-size: 70%; color: rgb(130, 130, 130);"> <div style="float:left">TEXT HERE</div><div style="float:right">TEXT HERE</div></p></td> </tr> Hello HTML experts; a nooby here. Searched for this and found tons of posts but none seemed to fit my question or fix my problem. To show what I am trying to do, I put all the details he http://www.sticksite.com/align/ Is there a solution that a nooby can understand? THANKS for your time! I'm just getting into making pages again, after 3 years off I'm REALLY rusty! Here is the code: <div align="center"> <table border="0" width="635" height="490" cellspacing="0" cellpadding="0"> <tr> <td height="43" width="635"> <img border="0" src="AURORENOVA.jpg" width="640" height="168"></td> </tr> <tr> <td height="322" width="635"> <h1>Monday January 22nd 2007</h1> <p>So here is the first update.</p> </td> </tr> </table> </div> I just want to know how I can align the text in the cell to the top of the cell instead of having it hovering in the center. When I do add more text the position changes, but I just want it all to align to the top. Thanks. I wanted to create 2 tables side by side with each other to form 2 columns. What I did was nested 2 tables into 1 table. However when I did this the text of one table is aligned halfway down the column. I tried aligning it to the top but it just stays there. Any idea what the issue is here. I have attached a picture and the source code to show what's going on here. Any help is much appreciated. Jesse Hi there, I am trying to align the text of a drop down box , so that it appears in the centre across all browsers. In the code below I have sucessfully indented the text from the left by 5px and sucessfully aligned it in the centre (vertically) However as I ahve used padding-top, it has also affected the drop down icon (v). Is there a way to align the text in the drop down without the drop down icon being affected across IE7, 8 , FF, and chrome ? I have tried adding line-height to the text and that doesnt work either. Thanks for your help HTML Code: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Text align center</title> <style type="text/css"> #selection { color: #999999; display: block; font-family: Arial; font-size: 11px; height: 24px; padding: 0; width: 382px; line-height:20px; padding-left:5px; } </style> </head> <body> <select id="selection"> <option value="0">Selection 1</option> <option value="1">Selection 2</option> <option value="2">Selection 3</option> <option value="3">Selection 4</option> <option value="4">Selection 5</option> </select> </body> </html> I'm trying to use the SPAN tag to override a DIV's attributes wherein it is initially TEXT-ALIGN: LEFT;. I thought for sure that I could override it with the SPAN tag but no luck. I'm doing it this way because I want a portion of the content in the DIV to align left and the other to align right. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> #quote { width: 500px; } #quoteTop { width: 460px; height: 40px; padding: 0 20px; background: url('images/quoteTop.gif'); text-align: left; } #quoteMiddle { width: 460px; padding: 0 20px 20px; background: url('images/quoteMiddle.gif'); text-align: left; } #quoteBottom { width: 460px; height: 80px; padding: 0 20px; background: url('images/quoteBottom.gif'); text-align: left; } </style> </head> <body> <div id="quote"> <div id="quoteTop"> <span style="text-align: right;"><a href="/">top</a></span> </div> <div id="quoteMiddle"> blah blah blah blah blah blah blah <em>blah blah blah</em> blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah <strong>blah blah blah</strong> blah blah blah blah blah blah-blah blah—blah blah blah blah blah blah blah blah blah BLAH! blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah </div> <div id="quoteBottom"> J. Doe </div> </div> </body> </html> Is overriding code a bad idea for what I'm trying to get done? Hi everyone Let me first say how awesome it is for the web to have a place like this where other html coders can relate. I've been lurking here for a couple months and now I come in with a bang, ha, yes a question. Nonetheless...I'm very greatful to be here. So onto my question.. I'm an assistant on a web design project and I'm having trouble aligning text on a website. I used divs on a WYSIWYG editor to place the text and when I opened the page everything looked fine, of course that was because it was done on this computers resolution specs. Now if you look you will see that when you are either: A) On a different resolution on another computer the text look ambiguous and doesn't align propery B) Minimizing the window or changing its shape the text also doesn't align. So my question is, how do I resolve this matter. Any html pro's or programmers in whatever arena would be truly appreciated in taking a look at this issue for me. Oh and about styles..I don't know much about css as I'm still a beginner and I'm thinking I can't even use styles since I already have that <style> code in there already, but it's not a css one. So I've written that off. Here is the website so you can see the issue (assuming you're not on 1280 for your width in resolution and not in full screen). URL - http://blendsphere.com/mailconnect/ Once at the site you can pull up the html code to see it too. Again thanks for any support or solutions on this. I am relatively new to the web design world so if you do have any solutions if you could make it brief that would be fantatstic. Ok thanks again. Please enlighten this noob, so far I've been enjoying html and hope to do so for much longer. I've kept up with things and it's no surprise that after all these years HTML is still so damned popular. Alright then. Why doesn't this work? I'm trying color the text green and center it. <h1 style="color: green" style="text-align=center">Some Text</h1> It works when I use the deprecated attribute align. <h1 style="color: green" align="center">Some Text</h1> It works when I do either one or the other. Either just coloring the text or just centering the text. It also works when I use div tags. Is it necessary to use the div tags? I'd like to be able to do both without using the deprecated attribute. I must be overlooking something. Appreciate any help! Thanks. ok, so I'm taking a course in college and the question came up... basically, if I do this [p style = "text-align: right"][h3]Information[/h3][/p] It won't apply the right justifictation, though if I put the justification setting in the h3 tag it does it, or if I switch the h3 to the outside and put the style on it, it works as well. Does anyone know why this is? My guess was that the h3 resets the text's formatting properties and then formats it? Sorry, I'm a newbie Hi I have a php form on the contact section of my website. It has a Name, Email and Message Box My Problem is in the message box i have made it quite large so they can type in what they need. But the blinking line to show where the start of the text is is in the centre of the box. How can I align this to the top left? Many Thanks Hi All As the thread title suggests, I'm trying to vertical-align the text in a submit button - see attached. The html and css I'm using is below. I've tried wrapping spans around the value and altering the padding (which looks better but makes the onclick outline appear half-way up the button). Help would be very much appreciated. Thanks, Steve The html is Code: print("<input class='mybtn' SIZE='5' type='submit' name='storedatabase' value='Store Database'>"); The CSS is Code: .mybtn { width: 120px; height: 21px; border-style: outset; border-color: red; font-size: 12px; color: #000000; background-color: rgb(250, 240, 230); border: 1px 1px 1px 1px; outline: 10px; text-align: center; } Hi, I was hoping someone could work out why when i assign text-align:right to a col element it doesn't align all the text in that column to the right. I've called the column col1, and in the css have put col1 { text-align:right }. Any ideas why this doesn't work? The text-align:right does work if put it straight into all of the td's within that column. Thanks, Matthew Millar hello, im kinda a noobie here, i cant align my image! I need it to be centered, but i cant seem to find how. How would you do this? |