CSS - Float Vs. Text-align?
I have a row of icons (for navigation, with a text description underneath them) I am trying to break out of table design so I want these divs aligned next to each other, with the image/text centered.
Everything looks pretty peachy... but in FF the text such as "Candidates" underneath the icon floats to the left because of the parent float.. it ignores the text-align: center. In other browsers it works but not in FF any help? Also if anyone has a better way of writing this code I would be open to suggestions since I am slowly breaking away from table design. Thanks! Code: .main #header { background: #FFFFFF; padding: 0 10px 0 10px; border-bottom: 1px solid black; border-top: 1px solid black; } .icon_nav{ font-size: 12px; float: left; text-align: center; margin-right: 12px; border: 1px solid black; } Code: <div id="header"> <div style="float: left"> <img src="images/logo.png" align="left" style="margin-right: 4px"/> <div style="color: #992204; font-size: 18px">XYZ Company</div> <div style="color: #992204; font-size: 14px">Professional Company</div> <div style="color: #992204; font-size: 12px">481-555-5555</div> </div> <div style="float: right;"> <div class="icon_nav"><img src="images/icons/home.png" /><br />Home</div> <div class="icon_nav"><img src="images/icons/employers.png" /><br />Employers</div> <div class="icon_nav"><img src="images/icons/candidates.png" /><br />Candidates</div> <div class="icon_nav"><img src="images/icons/directions.png" /><br />Directions</div> <div class="icon_nav"><img src="images/icons/event_planning.png" /><br />Event Planning</div> <div class="icon_nav"><img src="images/icons/contactus.png" /><br />Contact Us</div> </div> <br style="clear: both;" /> <!-- end #header --> </div> Similar TutorialsWhen i float my div to the left, i cant seem to get the text to align right, can someone show me a way out of this horriable predicament i have found my self in!! this is kind of a crude copy/paste of my current code, but it shows the problem. 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> <title> new document </title> <style> #contentstylesubheader { float: left; padding-left: 16px; height: 53px; padding-right: 30px; padding-top: 15px; } #contentstylesubheaderleft { float: left; font-size: 12pt; font-weight: bold; } #contentstylesubheaderright { text-align: right; position: relative; z-index: 100; float: right; } </style> </head> <body> <div id="contentstylesubheader"> <div id="contentstylesubheaderleft">blahblah</div> <div id="contentstylesubheaderright"> <span id="item_price">blah</span> <a href="#"><img src="../images/buynowbutton.gif" class="imgvalignmiddle padleftmedium padbottomsmall" alt="Add to Cart" /></a><br/> <a href="#"><img src="images/review_sm.png" alt="Review Our Payment Plan" /></a> </div> </div> </body> </html> I'm trying to convert a table based site into using css. I'm however running into small problems. For example, I have the following table Code: <table> <tr> <td><image></td> <td><another image></td> </tr> <tr> <td align="center">1992</td> <td align="center">2005</td> </tr> </table> I can convert it in the following way Code: <div style="float: left"><image><br />1992</div> <div style="float: left"><another image><br />2005</div> My problem is that I need the table itself is center aligned, so how do I get the divs center aligned as well? This won't work Code: <div align="center"> <the two divs> </div> Another problem is convering the following table into using divs Code: <table> <tr> <td rowspan=2 valign=middle><image></td> </tr> <tr> <tr> <td><image></td> <td><another image></td> </tr> <tr> <td rowspan=2 valign=middle><image></td> </tr> </table> Any help is appreciated - Kimppa I want to align the links and such long box on the right, but I don't want to use float because then it won't push down the footer on the page accurately if you know what I mean. Thanks.. http://www.innerspect.net/blog/ I am trying to get a 2 column layout to work across all browsers and I ran into a strange problem with center in Safari (or what Safari looks like according to the screenshot at http://www.snugtech.com/safaritest/) The page aligns correctly in my version of IE and Firefox. What I want to happen is for the table to center in the content div "image_block." In Safari the table is centering inside the container div "container" and sometimes behind the float right div "thumb_block." you can see it live at link here is the code Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>images</title> <BASE href="http://jasonhalac.com/picture_gallery/"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="/imagerollover.css" rel="stylesheet" type="text/css"> <link href="images.css" rel="stylesheet" type="text/css"> </head> <body"> <div id="top_image"> </div> <div align="left" id="list_tabs">header content</div> <div id="container"> <div id="thumb_block"> thumb block float right fixed width thumb block float right fixed widththumb block float right fixed widththumb block float right fixed widththumb block float right fixed widththumb block float right fixed widththumb block float right fixed widththumb block float right fixed widththumb block float right fixed widththumb block float right fixed widththumb block float right fixed widththumb block float right fixed width widththumb block float right fixed widththumb block float right fixed widththumb block float right fixed width widththumb block float right fixed widththumb block float right fixed widththumb block float right fixed width widththumb block float right fixed widththumb block float right fixed widththumb block float right fixed width widththumb block float right fixed widththumb block float right fixed widththumb block float right fixed width</div> <div id="image_block"> <p>image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block</p> <table width="200" border="1" align="center"> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td>test</td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> </table> <p> image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image block image blockimage blockimage blockimage blockimage blockimage blockimage blockimage blockimage blockimage blockimage blockimage blockimage blockimage blockimage blockimage blockimage blockimage blockimage blockimage blockimage blockimage blockimage blockimage blockimage blockimage blockimage block</p> </div> </div> <div id="tipDiv" style="position:absolute; visibility:hidden; z-index:100"></div> </body> </html> and css Code: #container{ margin: 0px; border: 0px; height: 600px; width: 915px; } #thumb_block{ width: 310px; margin: 0px; padding: 0px; float: right; } #image_block{ margin: 0px; padding: 15px 0px 0px 0px; } I'm creating a dynamic calendar and I can't get the numbers in the cells of my calendar table to align top-right! Here is my unformatted table... Code: <tr height="75"> <td><div align="right">12</div></td> <td><div style="vertical-align:top; text-align:right">13</div></td> <td>14</td> <td>15</td> <td>16</td> <td>17</td> <td>18</td> </tr> I want the numbers to be aligned top right, but if I put other data in there(currently there is none, but there will be), I'd like it to be aligned left. I tried using the vertical-align property in a div tag, but that didn't do anything... I can get it to align right with a div tag... sorry if it's such a stupid quesiton... Also, a side note... I thought that span allows you to align text as well using the style property, but that doesn't work at all (not even just to the right) I have both Chinese characters and English characters in one paragraph, but they don't align to the bottom with the English characters appearing like <sup>. I have used 'vertical-align' to align the text, but not successful. Pls help. I have the following CSS: Code: span.title { {color:#c38ec7;text-decoration: underline;font-family: forte;font-variant:small-caps;font-weight:bold;font-size:165%} } ... it works fine but when I try and put 'text-align:center;' that attribute does not seem to work. Is there any way of doing this??? Thanks OK, I have a few links stacked vertically and I'm trying to get them to align to the right. You can see the links here Please look at the sub navigation to the left of the big image. My CSS looks like this: Code: a.subnav{ font-family:arial,helvetica, sans-serif; font-size:11pt; color:#FFFFFF; line-height:24px; text-decoration:none; text-align:right; } what am I doing wrong? How can I get the text to align to the right? - thanks Hi there, ahhhh I have just decided to start using Firefox and now am rreworking my site. All new set up issues to try and fix and i don't even know where to start. Here is my site: www.kohlrbaby.com The issues: 1) nav bars are no longer positioned correctly vertically, nor can I get the text to center in FF 2) the white box extends longer then it should in FF vs IE 3) the text is extending off the white box in the catalogue area in FF please please offer me some css insight here is my .css code: BODY { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-TOP: 0px; PADDING-BOTTOM: 0px; margin:0px auto; SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; SCROLLBAR-SHADOW-COLOR: #a1b7d2; SCROLLBAR-FACE-COLOR: #a1b7d2; SCROLLBAR-ARROW-COLOR: #003366; SCROLLBAR-TRACK-COLOR: #cccccc; FONT-FAMILY: verdana, helvetica, arial, sans-serif; BACKGROUND-COLOR: #a1b7d2; TEXT-ALIGN: center; COLOR: black; FONT-SIZE: 12px; } #menuList { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px } #menuList UL { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px } #menuList LI { DISPLAY: inline; LIST-STYLE-TYPE: none } A.actuator { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 9px; PADDING-BOTTOM: 0px; MARGIN: 0px; COLOR: #000; PADDING-TOP: 0px; BACKGROUND-COLOR: transparent; TEXT-DECORATION: none } A.actuator:hover { COLOR: #958550 } .menu { BORDER-RIGHT: #ccc 1px solid; BORDER-TOP: #ccc 1px solid; VISIBILITY: hidden; BORDER-LEFT: #ccc 1px solid; COLOR: #000; BORDER-BOTTOM: #ccc 1px solid; POSITION: absolute; BACKGROUND-COLOR: #ffffff } .menu LI A { PADDING-RIGHT: 10px; DISPLAY: block; PADDING-LEFT: 10px; FONT-SIZE: 9px; PADDING-BOTTOM: 0px; MARGIN: 0px; COLOR: #000; LINE-HEIGHT: 1.75em; PADDING-TOP: 0px; BACKGROUND-COLOR: #ffffff; T EXT-DECORATION: none } .menu LI A:hover { COLOR: #eee; BACKGROUND-COLOR: #a1b7d2 } SPAN.key {TEXT-DECORATION: underline} #homeMenu {WIDTH: 100px} #catalogueMenu {WIDTH: 100px} #wholesaleMenu {WIDTH: 100px} #wheretobuyMenu {WIDTH: 100px} #contactMenu {WIDTH: 100px} A {FONT-WEIGHT: normal; COLOR: #000000; TEXT-DECORATION: none } A:visited {COLOR: #000000} A:hover {COLOR: #958550} A.set1:link {text-decoration: none; color: #7c8895 } A.set1:visited {text-decoration: none; color:#990000} A.set1:hover {text-decoration: none; color:#958550} #navHeader { PADDING-TOP: 0; HEIGHT: 110px; BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; MARGIN-LEFT: auto; MARGIN-RIGHT: auto; WIDTH: 650px; POSITION: relative; BORDER-BOTTOM: #000000 1px solid; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: center; z-index: 10; } #logoHolder{ position: relative; } img.nav_left{ float: left; } #smallLogo { POSITION: relative; top: 30px; left: -145px; font size: 11px; font-weight: bold; } div.gray_layer { background:#cccccc; height: 20px; width: 650px; border: solid #000000; border-right-width: 0px; border-left-width: 0px; border-top-width: 1px; border-bottom-width: 1px; position: relative; text-align: center; z-index: 50; top: 56px; } #second_links { FONT-SIZE: 9px; TEXT-ALIGN: center; position: relative; top: 58px; MARGIN-LEFT: auto; MARGIN-RIGHT: auto; margin:0px auto; } #navImageBox{ BORDER-RIGHT: #000000 1px solid; BORDER-TOP: 0px; BORDER-LEFT: #000000 1px solid; MARGIN-LEFT: auto; MARGIN-RIGHT: auto; WIDTH: 650px; POSITION: relative; BORDER-BOTTOM: #000000 1px solid; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: center; } #verticalLine{ height: 12px; width: 500px; border-right:#000000 1px solid; } img.banner{ BORDER-TOP: #000000 1px solid; BORDER-bottom: #000000 1px solid; } #contentHolder{ PADDING-TOP: 0; PADDING-bottom: 0; PADDING-left: 0; PADDING-right: 0; BORDER-RIGHT: #000000 1px solid; BORDER-Bottom: #000000 1px solid; BORDER-LEFT: #000000 1px solid; MARGIN-LEFT: auto; MARGIN-RIGHT: auto; WIDTH: 650px; POSITION: relative; BACKGROUND-COLOR: #ffffff; text-align: center; } #text{ padding: 10 30 0 30; line-height: 1.75em; text-align: left; } #catalogue{ padding: 20 30 15 25; width: 650px; position:relative; height: 100%; background:transparent; margin-right: auto; margin-left: auto; } .outline {border: 1px solid black;} div.catalogue_pic { position: relative; float: left; padding-right: 8px; } div.catalogue_text{ text-align: left; position: relative; LINE-HEIGHT: 1.25em; } div.float { position: relative; float: left; margin: 5 5 5 5; } div.float p { text-align: center; } #bottomText{ padding: 0px; margin-top: 10px; margin-bottom: 0px; margin-right: 20%; margin-left: 20%; /* opera does not like 'margin:20px auto' */ background: none; border: none; border-top: none; text-align:center; voice-family: "\"}\""; voice-family:inherit; font-family: verdana, arial, helvetica, sans-serif; font-size: 11px; } #blueBox{ text-align: center; position: relative; height: 27px; width: 150px; background-COLOR: #a1b7d2; top: -26px; } OK I have a layer that is described here : div#footer { position: absolute; top: 0; left: 0; width: 100%; height:14; background-color: #EED; font: 10px Verdana, sans-serif;} In this layer I wish to have some text in the left of the bar and at the far right (align-right) some text also ... how would i achieve this ??? -Thanks- Firstly, excuse my title, I couldn't think of a better way to put it . Now to the problem. In my layout I have a floated object, and text that flows around it, I can pad the text away from this floated object by using margins on the floated object. But I have created a class for <p> that I want to be padded further, and if I add padding-left to p.quote (the class) it makes no difference because the padding is simply going behind the float... As rubbish as that explanation was, I expect someone will pick up on what I'm going on about. How can I have some text indented (padded) further away from the float than other ? Thanks in advance. Confused yet? What's the best way to accomplish this? page testimonials.css Main.CSS If you look at the page, you will see that I have the "signature" of the testimonial giver aligned right, but I would like the two p elements to be aligned along their left edge as well (but on the right side of the page, with everything flowing around any images)... I tried floating them right, which and clearing the floats, but then the testimonials don't flow around the images... can this be done without getting divitis? I have a footer image on a site and I want to line up some of the text on the left and some of the text on the right. The relevant css footer code is this: Code: #footer { clear:both; background:url(images/footer.jpg); width:780px; height:71px; color:#ffffff; font-size:xx-small; } #footer .notover {padding-top:54px;} The xhtml is this: Code: <div id="footer"> <div class="notover">All this stuff is left aligned 54px from the top of the image.</div> </div> Now, how do I add some text on the same line as the class="notover" text that is right aligned? I thought it would be as simple as creating another div that specified text-align:right; but the text shows up right aligned and way below the footer image. Thanks in advance. Hi, The text in my navigation bar is slightly off-centre, even though I have applied the text-align:centre property in my style sheet. Is there anything obvious that would be throwing it off? Any help would be greatly appreciated. Jimmy Here is my style sheet: body { padding:0px; margin:0px; background-color:#ffffff; background-image:none background-repeat:no-repeat; font-family:verdana, arial, Helvetica, sans-serif; font-size:11px; color:#333; } /*--------------------DIVs------------------------------*/ div#pagecenter { margin: 0 auto; width: 1024px; background-color:#ffffff; } div#header { height:312px; background-color:#ffffff; background-repeat:no-repeat; background: ((address blocked: See forum rules)); padding:5px; text-align:right; text-display: none; color:#FFFFFF; } div#desc { visibility: hidden; text-align:left; } div#sitename { visibility: hidden; } div#oup h1 a { margin-top: -30px; margin-left: 10px; margin-right: auto; width: 100px; height: 30px; display: block; font-size: 0px; color: #003261 } div#oup h1 a:hover {color: #003261} div#clickableheader h1 a { margin-top: 20px; width: 1000px; height: 200px; display: block; font-size:0px; color: #003261; } div#clickableheader h1 a:hover {color: #003261} /* nav */ #nav { width: 400px; margin-left: 0px; margin-right: auto; margin-top: -70px; line-height: 20px; height: 100px; text-align: center; font-size: 12px;} #nav ul {list-style-type: none;} #nav li {display: block; float:left; width: 50px; padding: 40px 20px 40px 25px; border: none; background: url("images/DBlueUp.jpg") no-repeat;} #nav li.page-item-6 {padding: 23px 20px 20px 25px; border: none; background: url("images/PU.jpg") no-repeat;} #nav li.page-item-6.current_page_item {padding: 23px 20px 20px 25px; border: none; background: url("images/PD.jpg") no-repeat;} #nav li.current_page_item {border: none; background: url("images/DBD.jpg") no-repeat;} #nav li.page-item-51 {text-align: center; padding: 20px 25px 20px 20px; border: none; background: url("images/GreenUpCentre.png") no-repeat;} #nav li.page-item-51 a {text-align: center;} #nav li.page-item-51.current_page_item {padding: 20px 25px 20px 15px; border: none; background: url("images/GD.jpg") no-repeat;} /* navright */ #navright { width: 400px; margin-left: auto ; margin-right: 0px ; margin-top: -110px ; line-height: 20px; height: 100px; text-align:center; font-size: 12px;} #navright ul {list-style-type: none;} #navright li {display: block; float:left; width: 50px; padding: 20px 20px 20px 20px; margin: 5px; border: none; background: url("images/LBU.jpg") no-repeat;} #navright li.page-item-2 {border: none; background: url("images/OU.jpg") no-repeat;} #navright li.page-item-2.current_page_item {border: none; background: url("images/OD.jpg") no-repeat;} #navright li.page-item-48.current_page_item {border: none; background: url("images/LBD.jpg") no-repeat;} #navright li.page-item-13 {padding: 20px 20px 40px 20px; border: none; background: url("images/contact.jpg") no-repeat;} div.left-navi-blog { width:255px; margin-right:10px; float:left; } div.left-widget { width:255px; margin-top:40px; background-color:#ffffff; padding-top:1px; padding-bottom:200px; } div#leftbarfooter { background-color:ffff00; height:15px; } div#rightbarfooter { background-image:none; height:15px; } div.center-gauche-area { width:755px; margin-right:10px; float:left; margin-top:-50px; } div.center-blog { width:500px; margin-right:10px; float:left; margin-top:-0px; } div.post-title { visibility: hidden; margin:0px; padding:5px; height:16px; background-color:#FFFFFF; } div.post-content { background-color:#FFFFFF; margin:0px; padding:5px; text-align:center; border-top:#000000 0px solid; border-bottom:#000000 0px solid; } div.post-meta { color:#FFFFFF; margin:0px; padding:4px; height:14px; margin-bottom:10px; background-color: #ffffff; } div.single-meta { border:#444 1px dashed; padding:2px; margin:5px; margin-top:10px; color:#202D32; background-color:#B0BDC5; font-size:10px; } div.main-meta { border:#ccc 1px dashed; padding:2px; margin:5px; margin-top:10px; color:#666; background-color:ddd; font-size:10px; } div.commentblog { background-color:#B0BDC5; margin:0px; padding:5px; text-align:center; border-top:#000000 1px solid; border-bottom:#000000 0px solid; } div.singlecommentborder { float:left; } div.gravatorblog { float:left; width:70px; } div.singlecomment { float:left; width:410px; } div.right-navi-blog { width:200px; float:left; } div.right-widget { margin-top:80px; width:200px; background-color:#ffffff; padding-bottom:4px; padding-right:5px; } div.widget-header { color:#000000; font-weight:bold; padding-left:10px; padding-top:3px; } div.clear { clear: left; margin: 0; padding: 0; height: 0; line-height: 0; font-size: 0; } div#sharebar { margin-right:auto; margin-left:auto; margin-bottom:0px; background:#fff; height:30px; padding:25px; color:#003261; } div.ouplegal { margin-top:0px; background:#cbeefe; height:12px; text-align:center; padding:5px; color:#003261; font-size:10px; } div#footer { margin-top:0px; background:#003261; height:40px; text-align:center; padding-top:20px; color:white; font-size:16px; } div#footer :link {text-decoration:underline} /*--------------------textgestaltung--------------------*/ p{ margin:0px; } h1,h2,h3,h4,h5,h6{ color:#000000; margin:0px; padding:0px; font-size:11px; } acronym, abbr, span.caps { cursor: help; } acronym, abbr { } blockquote { } blockquote cite { } hr { } dl{ } dt{ } dd{ } ul { margin:0px; margin-left:12px; list-style:none; padding-left:8px; } ol{ } li { list-style:square; margin-top:3px; padding-top:2px; padding-bottom:2px; color:#810000; } ul ul{ } blockquote{ } blockquote p{ } code{ } pre{ } b, strong,i,em { } img{ padding:3px; margin:2px; } address { } img.ogtzuq{ border:0px; color:#3B4D56; } /*--------------------linkgestaltung--------------------*/ a {text-decoration:none; color:#FFFFFF; } a:link { text-decoration:none; color:#FFFFFF; } a:visited { text-decoration:none; color:#FFFFFF; } a:link:focus{ } a:link:hover, { font-weight: bold; } .post-content a{ color:#333; } .post-content a:link { color:#333; } .post-content a:visited{ color:#333; } .post-content a:link:active, .post-content a:visited:active{color:#333; } #single-meta a{ color:#333; } #single-meta a:link { color:#333; } #single-meta a:visited{ color:#333; } #single-meta a:link:active, #single-meta a:visited:active{color:#333; } .commentblog a{ color:#333; } .commentblog a:link { color:#333; } .commentblog a:visited{ color:#333; } .commentblog a:link:active, .commentblog a:visited:active{color:#333; } /*--------------------bilder als links--------------------*/ a img{ padding:3px; margin:2px; } a:link img { } a:visited img { } a:link:active img, a:visited:active img { } a:link:hover img, a:visited:hover img { padding:3px; margin:2px; } /*--------------------smilies im text--------------------*/ body img.wp-smiley{ } /*--------------------der weiterlesen link--------------------*/ .more-link{ } /*--------------------die seiten wenn es mehrere gibt--------------------*/ p.serif{ } /*--------------------suche--------------------*/ #searchform{ } input#s{ } input#searchsubmit{ } /*--------------------Kommentare--------------------*/ .alt { } .commentlist { padding:0px; margin:0px; } .nocomments { text-align:center; } .commentlist li { padding:0px; margin:0px; list-style:none; color:#111; } .commentlist cite, .commentlist cite a { } .commentlist p { text-align:center; padding:0px; padding-top:5px; } #commentform p { } .commentmetadata { } #commentform input { border:1px solid #333; margin-bottom:3px; } #commentform textarea { border:1px solid #333; width:488px; } #commentform #submit { } /*--------------------fuer den wp kalender--------------------*/ #wp-calendar th { } #wp-calendar { empty-cells: show; } #wp-calendar #next a { } #wp-calendar #prev a { } #wp-calendar a { } #wp-calendar caption { } #wp-calendar td { } #wp-calendar td.pad:hover { } /*-------------------- widgets---------------------*/ h2.widgettitle{ } .widget { } /*--------------------Archive--------------------*/ li#archives{ } .widget_archives{ } /*--recent posts--*/ li#recent-posts{ } .widget_recent_entries{ } /*--------------------text widget--------------------*/ li.widget_text{ } /*--id haengt von der nummer des text widgets ab*/ li#text-4{ } div.textwidget{ } /*--------------------links blogroll--------------------*/ li#links{ } .widget_links{ } /*--------------------kategorien--------------------*/ li#categories{ } .widget_categories{ } /*-------------------WP Requires------------------*/ .aligncenter { display: block; margin-left: auto; margin-right: auto; } .alignleft { float: left; } .alignright { float: right; } .wp-caption { border: 1px solid #ddd; text-align:center; background-color: #f3f3f3; padding-top: 4px; margin: 10px; -moz-border-radius: 3px; -khtml-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } .wp-caption img { margin: 0; padding: 0; border: 0 none; } .wp-caption-dd { font-size: 11px; line-height: 17px; padding: 0 4px 5px; margin: 0; } How exactly can i vertically align text in css, i can't seem to find an easy way to do it, i basically want my text to be in the middle of a divs height, so much easier in tables heh. Tried padding but that then adds to the height, making it pointless for this use Hi all if you look here -> http://www.prxa.info/gol2/community.php to the right where it has status updates i wish the update itself to align to the top of the avatar images to the left of it? I would like the align text next to the image and have it flow from the top down. Not adjacent then underneath it. HTML Source CSS Source Once you view the html file, I think you get a better picture of what I'm talking about. How do I align the text in my navbar vertically? I'm trying to do this. edit.... I can't post the link by adding vertical-align:middle; to my navbar tag and its not working. Do you see where i'm going wrong? hi. i'm trying to have some text in a div, but also i want the text align to the bottom of the div. something like. but i don't know how... have a look at http://www.desorden.net/prueba.html any ideas? thanks in advance |