HTML - Center Vertical Align
i'm having no luck vertically aligning the text in the MIDDLE within the <td>. Notice how it is aligned TOP in the rollover state. See code below, please help.
--- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>javascript free td link</title> <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> <style type="text/css"> #cell { width:278px; height:25px; } #cell2 { width:278px; height:25px; } a#roll { display:block; width:278px; height:25px; background:#FFFFFF; text-align:left; text-decoration:none; font-family:arial; font-size:14px; color:#FF0000; } a#roll:hover { background:#FF0000; color:#FFFFFF; } </style> </head> <body> <table border="0" cellpadding="1" cellspacing="0"> <tr> <td id="cell"><a id="roll"href="http://www.google.com"> HOME</a></td> </tr> <tr> <td id="cell2"><a id="roll"href="http://www.google.com"> ABOUT</a></td> </tr> </table> </body> </html> Similar TutorialsHello, I have been struggling with a "dead center" align for some time now, and because I am not such a skilled html code creator, I decided to apply for some help, I'll try to be as explicit as I can be. I have a simple html page, created with Dreamweaver CS3, and I've imported a Flash object, created with Flash 8. All I want is to align this movie horizontally as well as vertically, and when the page loads I have to send the focus to the flash movie, so that the visitor won't have to click on the flash movie in order to receive the focus. I can center align the flash like this: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- PICHI Media (c) 2008 All Rights Reserved --><HTML><HEAD><TITLE>Always Follow Dreams</TITLE> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css"> <!-- html,body { height:100%; width:100%; overflow:auto; } body,td,th { color: #000000; } body { background-color: #FFFFFF; background-image: url(); } a:link { color: #000000; } a:visited { color: #000000; } a:hover { color: #000000; } a:active { color: #000000; } .style4 {font-size: 9px; font-family: Verdana, Arial, Helvetica, sans-serif;} #apDiv1 { position:absolute; width:324px; height:25px; z-index:1; left: 354px; top: 303px; background-color: #000000; visibility: hidden; } --> </style> <script src="Scripts/AC_ActiveX.js" type="text/javascript"></script> <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script> <head> </head> <BODY> <CENTER> <DIV align=right></DIV> </CENTER> <TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" align=center border=0> <TBODY> <TR> <TD width="0" height="0" align=center vAlign=middle> <P align="center"> </script><script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','400','height','440','src','test','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','test' ); //end AC code </script><noscript> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="400" height="440" id="test" > <param name="movie" value="test.swf"> <param name="quality" value="high"> <embed movie src="test.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="400" height="440"></embed> </object> </noscript></P> </TD> </TR></TBODY></TABLE> </BODY></HTML> As you can see this source code will center align both ways horizontally and vertically. I belive this is doing the job: Code: <TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" align=center border=0> <TBODY> <TR> <TD width="0" height="0" align=center vAlign=middle> <P align="center"> Aligment sorted now let's get to the focus part. When the page loads I want to set the focus to the flash movie, and now I don't mean to remove that rectagle we all see in SP2 and IE7. No not that, that's easy to remove with some code. What I want is the actually focus in a text field in my flash movie. I can do this with the following 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=utf-8" /> <title>Untitled Document</title> <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script> </head> <body onLoad="window.document.test.focus();"> <center> <table width="100%" height="100%" align="center"> <tr> <td valign="middle" align="center"> <script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','name','test','width','400','height','440','id','test','title','test', 'src','test','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','test' ); //end AC code </script><noscript><object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" name="test" width="400" height="440" id="test" title="test"> <param name="movie" value="test.swf" /> <param name="quality" value="high" /> <embed src="test.swf" width="400" height="440" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" name="test"></embed> </object></noscript> </center> </td> </tr> </table> </body> </html> The focus part works with this i believe: <body onLoad="window.document.test.focus();"> where TEST is the ID of my flash movie. BUT, the movie is not vertically align. It still is horizontally, but not vertically. And this is my problem. If I combine the two examples, the one where the content is dead center, and the one where I set the focus to the flash movie it won't work, and I get this error: 'window.document.test' is null or not an object This page is right now on my site: http://www.danandrei.ro And if you double click on the small browser icon from the lower left corner, you know the one that shows error messajes like "DONE but with some errors". you can see what I mean. My question is: IS IT POSSIBLE TO BOTH CENTER ALIGN, HOR AND VERT, AND ALSO SET FOCUS TO THE FLASH MOVIE ? IF SO, DO YOU GUYS HAVE ANY CLUE HOW ? Thank you. hello, maybe this can not be done but..... i have managed to align the text on the lft and on the right in the same cell but, the text will not align to the top of the cell it seems that the use of the <p> in the line is preventing the text from sitting at the top of the cell can anyone help me with this? can i achive the same thing a different way? one cell, same line, text left and text right both at the top of the cell thanks sophia here is the example code..... http://www.freewebs.com/forumcode/ here is the code (note: everything is inline at this stage) <html> <head> <title> left and right but billy space on top >.< </title> </head> <body bgcolor="#FFFFFF"> <center> <table width="200" bgcolor="#FFFFFF" border="0" cellpadding="0" cellspacing="5"> <tr> <td style="text-align: center;" bgcolor="#DDDFFF" height="125" width="125"> <img src="image.jpg" border="0" alt="image" height="85" width="125"> </td> <td valign="top" bgcolor="#DDDFFF"> NOTE: this valign does nto set the text to the top <div style="width:200px;"> <p style="width:100px;float:left;text-align:left;vertical-align:top;">Left</p> <p style="width:100px;float:left;text-align:right;vertical-align:top;">Right</p> <div align="justify">this text sits underneath the above text<br>this text sits below the above text</div> </div> </td> </tr> </table> </center> </body> </html> I get this error message when trying to validate my page in 4.01 transitional. What html code can I use to get a vertical alignment with my tables. Error Line 18, column 79: there is no attribute "VALIGN" . ... cellspacing=10 align="center" valign="top"> Thanks Hello everyone, would someone please help me with just vertically centering the text within the box that says "This page was last updated on Monday, May 16, 2011 @ 10:39 AM" it's for my site located @ http://www.trillionaireme.com Here is my CSS code: Code: body {background-color:#ffffff;border-style:solid;border-width:5px;border-color:gray;border-bottom-color:#ffffff;border-left-color:#ffffff;border-right-color:#ffffff;} h1 {background-color:#f5f5f5;font-size:17px; color:grey; font-family:arial;word-spacing:30px;text-align:center;} h2 {font-size:17px; color:grey; font-family:arial;word-spacing:30px;text-align:center;} p {font-size:11px; color:grey; font-family:arial;} p.bordertop {border-style:solid;border-width:5px;border-color:gray;border-top-color:#ffffff;border-left-color:#ffffff;border-right-color:#ffffff;} p.borderbottom {border-style:solid;border-width:5px;border-color:gray;border-bottom-color:#ffffff;border-left-color:#ffffff;border-right-color:#ffffff;} IMG.displayed {display:block; margin-left:auto; margin-right:auto;} a:link {color:grey; text-decoration:none;} a:visited {color:grey; text-decoration:none;} a:hover {color:#c0c0c0; text-decoration:none;} a:active {color:#c0c0c0;text-decoration:none;} div.page {width:920px;padding:0px;border:0px;margin:0px auto;} div.logo {width:200px;padding:0px;border:0px;margin:0px auto;} div.topleftbox {width:250px;height:250px;padding:0px;border:1px;border-style:solid;border-color:#dcdcdc;position:relative;top:20px;left:1px;font-size:11px;color:grey; font-family:arial;} div.topmiddlebox {text-align: center;width:375px;height:25px;padding:0px;border:1px;border-style:solid;border-color:#dcdcdc;position:relative;top:-15px;left:270px;font-size:11px;color:grey;font-family:arial;text-align:center;margin-} div.toprightbox {width:250px;height:250px;padding:0px;border:1px;border-style:solid;border-color:#dcdcdc;position:relative;top:-15px;left:394px;font-size:11px;color:grey;font-family:arial;text-align:right;} My html code: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html><title>TrillionaireMe</title><link rel="shortcut icon" href="images/trillionaireme.ico"> <head><link rel="stylesheet" type="text/css" href="trillionaireme.css" /></head><body> <h1> </h1><div class="logo"><a href="http://www.trillionaireme.com"> <img class="displayed" src="http://www.trillionaireme.com/images/trillionaireme.jpg" width="196" height="233" border="0" /></a></div> <h1> </h1> <p class="borderbottom"> </p> <div class="page"><h2> <a href="http://www.trillionaireme.com/fitness.html">Fitness</a> <a href="http://www.trillionaireme.com/nutrition.html">Nutrition</a> <a href="http://www.trillionaireme.com/money.html">Money</a> <a href="http://www.trillionaireme.com/relationships.html">Relationships</a> <a href="http://www.trillionaireme.com/parenting.html">Parenting</a> <a href="http://www.trillionaireme.com/music.html">Music</a> <a href="http://www.trillionaireme.com/literature.html">Literature</a> <a href="http://www.trillionaireme.com/you.html">You</a> <a href="http://www.trillionaireme.com/them.html">Them</a> <a href="http://www.trillionaireme.com/vision.html">Vision</a></h2> </div> <div class="page"> <div class="topleftbox">This is the top left box. <div class="topmiddlebox">This page was last updated on Monday, May 16, 2011 @ 10:39 AM <div class="toprightbox">This is the top right box. </div></div></div></div> </body></html> Hi, is the css property vertical-align: middle supposed to work ? Because it doesn't on my website... maybe something is wrong... check this url http://aishazeijpveld.com/s/Onbepalen/02 (the image) thanks Hey! I have a small problem and to be honest, I don't believe there is a solution to it. I have made a table with a certain height. Now I want to put an image into this table first, aligned at the top, then I want to have a piece op text under this picture, but aligned at the very bottom of the table. It might look something like this: HTML Code: <table width="300" height="300" border="1"> <tr> <td> <img src="Foto.jpg" width="40" height="40"> <br> Text </td> </tr> </table> But I really want the text not 1 line below the image, but aligned seperately at the bottom. By the way, the position of the text has to be independant from the height of the table. I have tries everything, from css and style to span and div, but nothing worked. Maybe this is because, i think, vertical-align is not yet recognised officially. Hopefully someone can come up with a solution! Thank you, Laurens, I need to apologize beforehand for asking help with such a aimple process. I'm doing a site exclusively in HTML. It looks pretty good for my first attempt, but I can't find data ANYWHERE online to vertically align images. The site is frames, the top frame just displays an image, I need the image to self-center to accommodate other screen resolutions. Perhaps I need to align the text(that isn't there), and then align the image to it? Thanks in advance, Tom Hello to all Forum members. It's my first post here. I have a problem on my site using FF 2.0 and opera. When you open http://review4dummies.com/test/index.php you see it has horizontal alignment = center, but when you click on link About Us the site will move about 10 pixels to the right and of course its centered but... huh not exactly. When you browse and click on link Contact Us its back to normal. Clicking on report-a-bug does not move site too. I was checking whole code and noticed that if i add some paragraphs and blank tables to the about-us.php file everything seems to be ok. This is driving me nuts, any help will be apreciated. PS: in ie6 everyting seems to be ok. PS2: I also noticed this bug on some sites: eg. home.pl when you click on menulink "Praca" it will move horizontaly too. eg2. nazwa.pl when you click on menulink "KONTAKT" it will move too. Anybody? Best Regards! I have got a menu working but i don't know how to align it to the left center of the screen. at the moment it is at the top left of the screen. here is the code that i have got so far: HTML Code: <head> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Demo Menu 1</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" > <link rel="stylesheet" type="text/css" href="sddm.css" > <title>JSwitch Slide Menu</title> </head> <body> <div class="navbar" style="width: 148; height: 253;"> <!-- *********************************Start Menu****************************** --> <div class="mainDiv" > <div class="topItem" >Demo Menu 1</div> <div class="dropMenu" ><!-- --> <div class="subMenu" style="display:inline;"> <div class="subItem"><a href="#">Configuration</a></div> <div class="subItem"><a href="#">Tool Box</a></div> <div class="subItem"><a href="#">Contact Us</a></div> <div class="subItem"><a href="#">Sub Menu 4</a></div> <div class="subItem"><a href="#">Sub Menu 5</a></div> </div> </div> </div> <!-- *********************************End Menu****************************** --> <br> <!-- *********************************Start Menu****************************** --> <div class="mainDiv" > <div class="topItem" >Demo Menu 2</div> <div class="dropMenu" ><!-- --> <div class="subMenu" style="display:none;"> <div class="subItem"><a href="#">Configuration</a></div> <div class="subItem"><a href="#">Sub Menu 2</a></div> <div class="subItem"><a href="#">Sub Menu 3</a></div> <div class="subItem"><a href="#">Sub Menu 4</a></div> </div> </div> </div> <!-- *********************************End Menu****************************** --> <script type="text/javascript" src="xpmenuv21.js"></script> </div> <p> </p> </body> Hello Guys, I have made some page with nested div's. I made it's width to 80%. I want that to be completely aligned to center of the page. I tried with css and with html and with parent div. But some thing makes it not to work. Can you see the below code and please suggest me to get that to center. HTML Code: <style type="text/css"> .nm-left { text-align:left; vertical-align:text-top; } .nm-left .nm-video, .nm-right .nm-video-reverse, .nm-left .nm-avatar, .nm-left .nm-avatar-wrapper, .nm-left span.nm-button, .nm-left #user-form input#submit { float:left; } .nm-right { text-align:right; vertical-align:text-top; } .nm-right .nm-video, .nm-left .nm-video-reverse, .nm-right .nm-avatar, .nm-right .nm-avatar-wrapper, .nm-right span.nm-button, .nm-right #user-form input#submit { float:right; } .nm-wrapper { clear:both; font-size:14px; line-height:21px; margin:20px 0; padding:0px; } .nm-wrapper div { background-position:99% 10px; background-repeat:no-repeat; margin:0; padding:0; } .nm-wrapper div div { } .nm-wrapper div div div { overflow:hidden; } #ninjamonials .nm-wrapper div div div div { background:transparent; padding:20px;} #ninjamonials .nm-wrapper div div div div div { padding:0; } blockquote.nm-summary div, blockquote.nm-testimonial div, blockquote.nm-summary, blockquote.nm-testimonial, blockquote.nm-summary p, blockquote.nm-testimonial p { background:transparent; border:none; padding:0; margin:0; text-decoration:none; font-style:normal; } span.nm-button, #user-form input#submit { margin:5px; } #user-form { background-position:left bottom; background-repeat:repeat-x; clear:both; font-size:14px; line-height:21px; margin-top:20px; padding:5px; } .nm-testimonial, .nm-summary, .nm-author { padding-left:140px } .nm-summary { font-weight:bold; } .nm-author { display:block; font-size:12px; } .nm-name { font-weight:bold; padding-right:5px; } .nm-video, div.nm-video-reverse { margin:10px !important; } .nm-audio, .nm-author { padding:5px !important; } .nm-audio { display:block; } .nm-name { font-style:italic; } /* Oceanic Avatar-Specific CSS */ .nm-avatar { } .nm-avatar img { background-color:#F7F7F7; border:1px solid #DBDBDB; margin:10px; padding:5px; } /* Oceanic Module-Specific CSS */ .nm-module { overflow:hidden; margin: 5px; padding:4px!important; } .nm-module div.nm-avatar img { } .nm-module div.nm-avatar { } /* Blue Style */ .nm-right.nm-oceanic-blue.nm-module, .nm-right.nm-oceanic-blue .nm-module { background:#EFF8FF url(oceanic_blue_tl.png) no-repeat -10px -10px; border:1px solid #D5ECFF; -moz-border-radius:5px; -webkit-border-radius:5px; } .nm-left.nm-oceanic-blue.nm-module, .nm-left.nm-oceanic-blue .nm-module { background:#EFF8FF url(oceanic_blue_nq.png) no-repeat -10px -10px; border:1px solid #D5ECFF; -moz-border-radius:5px; -webkit-border-radius:5px; } .nm-right.nm-oceanic-blue .nm-wrapper { background:#EFF8FF url(oceanic_blue_tl.png) no-repeat; color:#666; } .nm-left.nm-oceanic-blue .nm-wrapper { background:#EFF8FF url(oceanic_blue_nq.png) no-repeat; color:#666; } .nm-oceanic-blue .nm-wrapper div { background:url(oceanic_blue_tr.png) no-repeat 100% 0; } .nm-oceanic-blue .nm-wrapper div div { background:url(oceanic_blue_bl.png) no-repeat 0 100%; } .nm-oceanic-blue .nm-wrapper div div div { background:url(oceanic_blue_br.png) no-repeat 100% 100%; } .nm-oceanic-blue #user-form { background-color:#EFF8FF; border:1px solid #D5ECFF; -moz-border-radius:5px; -webkit-border-radius:5px; } .nm-left.nm-oceanic-blue .nm-avatar-wrapper { margin:0 10px 10px 0; min-height:70px; min-width:90px; background: url(oceanic_blue_quote.png) no-repeat 10px 10px !important; } /* Green Style */ .nm-right.nm-oceanic-green.nm-module, .nm-right.nm-oceanic-green .nm-module { background:#EBF4D7 url(oceanic_green_tl.png) no-repeat -10px -10px; border:1px solid #9AC740; -moz-border-radius:5px; -webkit-border-radius:5px; } .nm-left.nm-oceanic-green.nm-module, .nm-left.nm-oceanic-green .nm-module { background:#EBF4D7 url(oceanic_green_nq.png) no-repeat -10px -10px; border:1px solid #9AC740; -moz-border-radius:5px; -webkit-border-radius:5px; } .nm-right.nm-oceanic-green .nm-wrapper { background:#EBF4D7 url(oceanic_green_tl.png) no-repeat; color:#666; } .nm-left.nm-oceanic-green .nm-wrapper { background:#EBF4D7 url(oceanic_green_nq.png) no-repeat; color:#666; } .nm-oceanic-green .nm-wrapper div { background:url(oceanic_green_tr.png) no-repeat 100% 0; } .nm-oceanic-green .nm-wrapper div div { background:url(oceanic_green_bl.png) no-repeat 0 100%; } .nm-oceanic-green .nm-wrapper div div div { background:url(oceanic_green_br.png) no-repeat 100% 100%; } .nm-oceanic-green #user-form { background-color:#EBF4D7; border:1px solid #9AC740; -moz-border-radius:5px; -webkit-border-radius:5px; } .nm-left.nm-oceanic-green .nm-avatar-wrapper { margin:0 10px 10px 0; min-height:70px; min-width:90px; background: url(oceanic_green_quote.png) no-repeat 10px 10px !important; } /* Grey Style */ .nm-right.nm-oceanic-grey.nm-module, .nm-right.nm-oceanic-grey .nm-module { background:#EFEFEF url(oceanic_grey_tl.png) no-repeat -10px -10px; border:1px solid #999; -moz-border-radius:5px; -webkit-border-radius:5px; } .nm-left.nm-oceanic-grey.nm-module, .nm-left.nm-oceanic-grey .nm-module { background:#EFEFEF url(oceanic_grey_nq.png) no-repeat -10px -10px; border:1px solid #999; -moz-border-radius:5px; -webkit-border-radius:5px; } .nm-right.nm-oceanic-grey .nm-wrapper { background:#EFEFEF url(oceanic_grey_tl.png) no-repeat; color:#666; } .nm-left.nm-oceanic-grey .nm-wrapper { background:#EFEFEF url(oceanic_grey_nq.png) no-repeat; color:#666; } .nm-oceanic-grey .nm-wrapper div { background:url(oceanic_grey_tr.png) no-repeat 100% 0; } .nm-oceanic-grey .nm-wrapper div div { background:url(oceanic_grey_bl.png) no-repeat 0 100%; } .nm-oceanic-grey .nm-wrapper div div div { background:url(./images/oceanic_grey_br.png) no-repeat 100% 100%; } .nm-oceanic-grey #user-form { background-color:#EFEFEF; border:1px solid #999; -moz-border-radius:5px; -webkit-border-radius:5px; } .nm-left.nm-oceanic-grey .nm-avatar-wrapper { margin:0 10px 10px 0; min-height:70px; min-width:90px; background: url(./images/oceanic_grey_quote.png) no-repeat 10px 10px !important; } /* White Style */ .nm-right.nm-oceanic-white.nm-module, .nm-right.nm-oceanic-white .nm-module { background:#FFF url(oceanic_white_tl.png) no-repeat -10px -10px; border:1px solid #E8E8E8; -moz-border-radius:5px; -webkit-border-radius:5px; } .nm-left.nm-oceanic-white.nm-module, .nm-left.nm-oceanic-white .nm-module { background:#FFF url(oceanic_white_nq.png) no-repeat -10px -10px; border:1px solid #E8E8E8; -moz-border-radius:5px; -webkit-border-radius:5px; } .nm-right.nm-oceanic-white .nm-wrapper { background:#FFF url(oceanic_white_tl.png) no-repeat; color:#666; border:1px solid #E8E8E8; -moz-border-radius:5px; -webkit-border-radius:5px; } .nm-left.nm-oceanic-white .nm-wrapper { background:#FFF url(oceanic_white_nq.png) no-repeat; color:#666; border:1px solid #E8E8E8; -moz-border-radius:5px; -webkit-border-radius:5px; } .nm-oceanic-white .nm-wrapper div { background:url(oceanic_white_tr.png) no-repeat 100% 0; } .nm-oceanic-white .nm-wrapper div div { background:url(oceanic_white_bl.png) no-repeat 0 100%; } .nm-oceanic-white .nm-wrapper div div div { background:url(oceanic_white_br.png) no-repeat 100% 100%; } .nm-oceanic-white #user-form { background-color:#FFF; border:1px solid #E8E8E8; -moz-border-radius:5px; -webkit-border-radius:5px; } .nm-left.nm-oceanic-white .nm-avatar-wrapper { margin:0 10px 10px 0; min-height:70px; min-width:90px; background: url(oceanic_white_quote.png) no-repeat 10px 10px !important; } .nm-audio1 {padding:5px !important; } .nm-summary1 {padding-left:140px } </style> <div id="ninjamonials" class="nm-oceanic-grey nm-left" style="width:80%"> <!--bof nm-wrapper --> <div class="nm-wrapper"> <div> <div> <div> <div class="nm-content"> <div class="nm-avatar-wrapper"> </div> <blockquote class="nm-testimonial"> <p>This is a testimonial test. This is a testimonial test. This is a testimonial test. This is a testimonial test. This is a testimonial test. This is a testimonial test. </p> <p>This is a testimonial test. This is a testimonial test. This is a testimonial test. This is a testimonial test. This is a testimonial test. This is a testimonial test. </p> </blockquote> <div class="nm-author"> <span class="nm-name">Name</span> (Website<span class="nm-title"></span> ~ <span class="nm-auth-url"><a href="http://www.google.com/">www.google.com</a></span> , <span class="nm-location">Mine</span> ) </div> <!--eof nm-author --> </div> <!--eof nm-content --> <!--eof wrapper --> </div> </div> </div> </div> <div class="nm-wrapper"> <div> <div> <div></div></div></div></div></div> Waiting for your solution. Thanks in advance! Hi! I've been struggling with a problem how to align a div to center and top of browser, but just simply can't seem to find a working solution. Here's an example page where I have aligned the site to top but it is not centered. http://www.marufox.net I am not working on that current site now, but still something similar, so the code can differ from what you see there. Any help will be greatly appreciated! I can't get my whole nav bar to align to the center of my sidebar 1 div. Check it out please. http://northwindappaloosas.com I just need my image I floated left in the first paragraph and right in my last paragraph to align at the top of the paragraph with my text. My vertical-align isn't working because it is block style (my guess). Here is my code: <style type= "text/css"> body {background-image:url('images/BG.gif');} h1 { font-size:26pt; font-family: 'Arial'; text-align:center; color:#ff00ff; } p { font-size:12pt; font-family: 'Arial'; text-align:justify; color:#000000; margin-right:20px; } strong {color:#0000ff;} /* ID's for Images */ #ITT { Height:150px; Width:800px; } #Morning { float:left; margin-right:20px; margin-bottom:20px; vertical-align:text-top;} #Erie { float:right; margin-top:20px; margin-left:20px; vertical-align:text-top; } </style> <img id = "ITT" src = "images/ITTLogo1.jpg" alt = "Logo" /> <h1>asdfkljsadl;f</h1> <p> <img id = "Morning" src = "images/MorningDew.jpg" alt="Morning Dew"/> Paragraph 1 </p> <p> Paragraph 2 </p> <p> <img id = "Erie" src = "images/ErieIsland1.jpg" alt="Erie Island"/> Paragraph 3 </p> </body> </html> Thanks in advance! Hello all. My problem is that I cannot vertical align a link directly after a textfield. Safari shows below example just fine, every other browser has "Text" a little lower than "Label:". I have tried many approaches but none have worked. Maybe someone here has the solution. I'd appreciate it a lot. HTML Code: <table border="1" > <tr> <td align="right" >Label:</td> <td align="left" > <input name="textfield" type="text" /> <a href="" >Text</a> </td> </tr> </table> Thanks, sdii 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 Everyone, I can't seem to figure out how to make my pages horizontaly align to the center of the screen. Seemed easy enough but can't seem to make it work. Here is one of those pages : http://www.ruze.ca/Kunstler/Homepage.html It would be amazing if one of you could tell me how to fix this. I'm by no means a web guy, I'm just trying to put up a temporary version of the site I'd like to have made by a real pro when I can afford it. Thanks! D. As You Can see that the url i am providing includes stuff which is aligned left and i want to align it to center how can i do it . Guide me if there is an appropriate way to align it to center without changing the whole of the style sheet. http://www.ims-sc.org REGARDS 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; } 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 there i am trying to center align and image and text as well as float the text to the left of the image. It seems I can only manage to do one or the other, the code below floats the text to the left of the image, but the two elements sit to the left on page. How can i center this? HTML: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link rel="stylesheet" type="text/css" href="styles.css" /> </head> <body> <center> <div id="spacer"></div> <div id="header"></div> <div class="row"> <div class="left"> <img src="ripple.jpg"/> </div> <div class="right"> <p class="bio">After leaving school I studied graphic design at Kingsway College of Art in London. During this time I learned the basics of the profession.</p> </div> </div> <ul id="minitabs"> <li><a href="Home.html">Home</a></li> <li><a href="Biography.html">Biography</a></li> <li><a href="Portfolio.html">Portfolio</a></li> <li><a href="Contact.html">Contact</a></li> <li><a href="About.html">Links</a></li> </ul> <div id="underline"></div> </center> </body> </html> CSS: Code: row { position: center; width: 800px;} .left { width:400px; height: 330px; float: left; } .right { width: 400px; height: 330px; float: left; } #spacer { width:800px; height:12px; background-color: #3366ff; } #header { position:center; width:800px; height:75px; background-image:url('images/portfolio.gif'); background-repeat:no-repeat; } /* Styles for nav bar */ #minitabs { clear: both; padding: 25px 0 14px 10px; width: 800px; } #minitabs li{ margin-left: 0px; padding: 0px; display: inline; list-style: none; } #minitabs a{ line-height: 14px; font-weight: bold; font-family: verdana; margin: 0 10px 4px 0px; text-decoration: none; color: #777777; } #minitabs a.active, #minitabs a:hover { border-bottom: 10px solid #3366ff; font-weight: bold; padding-bottom: 5px; color #ff6600; } /* Styles for images on Portfolio page */ #images1 { clear: both; margin-top: 25px; padding: 0px 0px 10px 0px; width: 800px; } #images1 li{ margin-left: 0px; padding: 5px; display: inline; list-style: none; } #images2 { clear: both; margin-top: 25px; padding: 0px 0px 10px 0px; width: 800px; } #images2 li{ margin-left: 0px; padding: 5px; display: inline; list-style: none; } #underline { margin: -16px 100px; width: 800px; border-bottom: 1px solid; color: #777777; } p.bio { text-align: center; width:500px; font-family: verdana; } Any suggestions? Thank you Jackie |