CSS - Vertical 3 Image Array Collapse
Hi!
Any helpful advise is appreciated.... I have an issue where I trying to arrange 3 images in a simple column with a small amount of space in between, all the way to the right. It funny if I disable the CSS code the 3 image array will return left in the perfect column, but I want it on the right, and only get an image pile-up on the right side. Please PM to get the URL to see the test page. Example HTML: <div class="thumbnail"> <h2><b>heading</b></h2> <img src="(URL address.....file1.png)" alt="" width="278" height="142"><br> <!-- Caption --> </div> <br class="clearboth"> <div class="thumbnail"> <img src="(URL address.....file2.png)" alt="" width="278" height="142"><br> <!-- Caption --> </div> <br class="clearboth"> <div class="thumbnail"> <img src="(URL address.....file3.png)" alt="" width="278" height="142"><br> <!-- Caption --> </div> Example CSS: .thumbnail { width: 278px; margin: 30 15px 15px 30; right:40px; position:absolute; } .clearboth { clear:both; } THank you in advance for your help! Best, Digigumball Similar TutorialsHello, first post here... I have an image floated left, with an unordered list (ul) next to it. Problem is, the margin values I set for the list are totally ignored, so the list bullets end up overlapping the image. Seems the only solution is to set margins on the image, but that also pushes away non-overlapping content, like the h3 that is above the list and positioned fine. Any ideas? Everything works fine if/when I float the list left, but that seems draconian... Code: css Code: Original - css Code img.alignleft { margin-right:0.5em; display:inline; float:left; } ul, ol, dl { line-height:1.5em; margin:0 0 1em 1em; }
HTML4Strict Code: Original - HTML4Strict Code <p><img src="" width="295" height="400" class="alignleft"/></p> <h3>A Sampling of Workshops We Have Brought to Nonprofits</h3> <ul> <li>An Introduction to Social Media for the Nonprofit</li> <li>An Introduction to Storytelling for the Nonprofit</li> <li>Using Social Media and Digital Storytelling in the Classroom</li> </ul> <p><img src="" width="295" height="400" class="alignleft"/></p> I think this is a pretty basic css question... How do you get an image to vertically align to the top? I've tried "vertical-align: top;" but no dice. Here's where I want to apply this: http://www.ergopro.com See, I want the credit card image (up top) to vertically align to the top, flush with the TrustWave logo. How is this done? Much thanks in advance! My site I am redesigning this site for a theater camp company. I want to create the effect of stage lights shining with a image rollover and am partly there. I am stuck now because I want to use an HR as the cross beam with images of stage lights directly below (take a look at the site to understand). I do not know how, or if it's possible, to line up the images directly below the HR (bar) so there is no space at all. Any help? I have an image and to the right of it I have text. I want the text to be aligned veritcally to the middle of the image. I can do the following and it works: Code: .icon {vertical-align: middle;} <a href="index.php"><img src="images/icon.png" class="icon" border="0" /></a> Header Goes Here However, if I wrap H1 tags around "Header Goes Here" the text drops below the image. Any ideas on how to use header tags and have it aligned? I know I could make the icon as a background with H1 but I want it to be clickable. Is there any way to make it so the H1 I got this WP style, and I edited it quite a bit. Code: #menu { clear: right; float: left; position: relative; padding:0 10px 0 10px; margin:0 0 0 34px; width: 160px; /* border-left: 1px solid #bbaf95; border-right: 1px solid #bbaf95; */ background: #fff rl(wp-images/bg.png) repeat-y 100% 0; } The problem being is that the image border does not reach the where the css borders were, and it does not stretch 100% to the bottom either. Even more, it takes three seconds to load from where it use to take less than one. Check it out: http://randomized.us Thanks in advance. I'm trying to create an image that will adjust to fit the screen size and always be at least 100% of the screen. Basically, I'm looking to have the "trunk" image in the LeftBody div, always stretch to reach the image in the banner and the footer. If I have enough content, the image will repeat just fine and fill my needs, but if there is no content, how can i make the image fit the page? My code is accessible via the /Samples/ directory. Thanks so much... midcitybrewery.com/Samples/sample.html Is there any style you can apply directly to an image to vertical align it at the top or the bottom? Hi, Does anyone know how to veritcally align text using CSS? like <tr valign='middle'> when using tables. My page is on: http://www.3003online.com/demos/ecoceylon/v2/ You can see a difference in the "Home - About Us - Products - Contact Us" links when viewing from IE and Mozilla Firefox. Basically, I would like the text to be centered vertically in the bar... but CSS by default puts it on top. I tried adding padding,which helped in IE... but Firefox still shows the links a bit higher than they should be.,... any ideas how to fix this? Also, a different problem in case anyone knows how to fix it... you can see a small brown bar on the top bar. It is 50px in height. But I have no idea how to make its width as wide as the remainder of the page (this would change with different resolutions). The main content of the page is 760px wide. I would like a brown box next to that, which is 50px in height and the remainder width. Any ideas? "width: auto;" doesn't work unfortunately [ this is a follow up to my previous thread http://forums.devshed.com/showthread.php?t=270438 Any help would be greatly appreciated. Thanks very much. I am porting over a Nucleus CMS skin to WordPress and I am about 90% done with the port... http://www.jamesmeister.com/mom/ as you can see, the ID #wrapper is not being let by the sidebar and is causing major headaches. it is supposed to look like this: http://skins.nucleuscms.org/blog/16 My CSS file is located he http://jamesmeister.com/mom/wp-content/themes/stanch2/style.css Can anyone figure out what could be the problem and how to fix it? Thanks! I have several adjoining tables (tables are stacked on top of each other) and I'm using css to set the borders using the following: border: 1px solid #FFFFFF; border-collapse: collapse; IE doesn't collapse the horizontal border of the adjoining tables (one table underneath another table). Mozilla renders fine (the horizontal borders collapse). Is there a way to get IE to collapse the horizontal borders on adjoining tables? Thanks for any help. -D- Hello, Here is an example of the issue I'm having.. http://www.patricksaviation.com/backend.php In Firefox and IE, the border color is correct, but in Opera the color is just black; this is caused by applying border-collapse: collapse. I tried adding, in addition to to the standard html bordercolor, a CSS border-color, which helped change Opera to a dark green (not the right color, but closer) but it also causes the border color in IE to darken (the wrong color). Does anyone know what causes this or how I could fix it? Thanks, Patrick On my new design: http://codymays.net/~private_ftp/theed The header and footer of the green block have a space on them and I cannot figure out why. I had this problem with the design before, but I started over and now I only have this issue with IE6 and below. It works in all other browsers. I can clear the spaces if I set the margin-top of the block's content area to -4 and the footer's margin-top to -4. But once this is done, IE then redraws the div at the bottom of the page for no apparent reason. Any ideas/suggestions on what to do here would be appreciated. Thanks, Cody Hi all Code: <!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" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>untitled</title> </head> <body> <table style="margin-bottom: 10px;" cellspacing="0" cellpadding="0"> <tr> <td>asdf</td> </tr> </table> <p style="margin-top: 10px;">asdf</p> </body> </html> Why do the margin-bottom of the table and the margin-top of the p not collapse (only tested in Firefox2)? Why is there 20px between them? I don't understand the world of margins anymore... Is this an exception or a bug or what? Thanks for help, Josh I am using a table with 5 rows and 5 columns of data. First i hide <td>'s using style.display="none"; When i use style.display=""; for showing up <td>'s , in IE its working fine, but in Netscape 7.1 (Windows) the columns get collapsed on one another. Can anybody know why this happens ? Is there any other way it can solved. Need help pls. Hi. Have created some simple tabs using table cells. Active tab should have bottom-border color equal to page background-color. Non-active tabs should have bottom-border=black. Works fine in IE, but does not work very well in Firefox. If I remove the border-collapse:collapse on the table, then firefox also work... but I would like to be able to keep the 1px border between each table cell. So is there a way to make this work in both IE and Firefox... and hopefully most other browsers... See code below: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html> <head> <style type="text/css"> a.menu_top:link {color: #000000; text-decoration: none;} a.menu_top:visited {color: #000000; text-decoration: none;} a.menu_top:hover {color: #000000; text-decoration: none;} a.menu_top:active {color: #000000; text-decoration: none;} td.menu_top_passive { background-color: #777; border-left: 1px #000000 solid; border-right: 1px #000000 solid; border-top: 1px #000000 solid; border-bottom: 1px #000000 solid; text-align: center; cursor:pointer; font-weight: bold; padding: 5px 20px 5px 20px; margin: 0; } td.menu_top_active { background-color: #bbb; border-left: 1px #000000 solid; border-right: 1px #000000 solid; border-top: 1px #000000 solid; border-bottom: 1px #bbb solid; text-align: center; cursor:pointer; font-weight: bold; padding: 5px 20px 5px 20px; margin: 0; } </style> <script language="JavaScript"> function change(id, url) { for (i=1; i<6; i++){ eval("document.getElementById("+i+").className='menu_top_passive'"); } eval("document.getElementById("+id+").className='menu_top_active'"); } </script> </head> <body style="margin:0; padding:0; background-color:#bbb;"> <br><br> <center> 1. Load the page.<br> 2. Click Item 4.<br> 3. Click Item 2.<br><br> Why is the bottom border of the menuelements (table cells) not getting correct in Firefox?<br> None-active menuelements should have a border-bottom = black, active should have same bottom-border as page.<br> Notice that I use border-collapse on the table in order to get the cell-border 1px thick between the menuitems.<br> If I remove border-collapse, then there is no strange behaviour in Firefox.<br> Any way to get this working in Firefox without breaking it in IE? </center> <br><br><br> <table border="0" cellpadding="0" cellspacing="0" align="center" style="border-collapse:collapse;"> <tr> <td id="1" nowrap class="menu_top_active" onClick="change('1');"><a href="javascript:;" class="menu_top">Item 1</a></td> <td id="2" nowrap class="menu_top_passive" onClick="change('2');"><a href="javascript:;" class="menu_top">Item 2</a></td> <td id="3" nowrap class="menu_top_passive" onClick="change('3');"><a href="javascript:;" class="menu_top">Item 3</a></td> <td id="4" nowrap class="menu_top_passive" onClick="change('4');"><a href="javascript:;" class="menu_top">Item 4</a></td> <td id="5" nowrap class="menu_top_passive" onClick="change('5');"><a href="javascript:;" class="menu_top">Item 5</a></td> </tr> </table> </body> </html> /*Left Links*/ #leftcol{ float: left; display: block; width: 200px; /*Width of left column*/ } ul#leftcol{ list-style-type: none; padding: 0.5em 0 1em 0; margin: 0; } li#leftcol{ margin: 0; padding: 0; } #leftcol a, #leftcol a:link, #nav a:visited { float: left; display: block; position:relative; width: 165px; height: 1%; padding: 8px 5px 8px 30px; margin: 0; font: normal 11px Arial, Helvetica, sans-serif; font-size: 12px; color: #FFFFFF; text-decoration:none; background-image:url(images/sidelinks_back.jpg); border-bottom: 1px solid #FFFFFF; } #leftcol a:hover { background-position: 0 -45px; color: #0C0F1B; } #leftcol img { border-bottom: 1px solid #FFFFFF; } <!--LEFT COLUMN --> <ul id="leftcol" ><li><img src="images/sidelinks_top.jpg" alt="Our Services" width="200" height="40" border="0" /></li> <li><a href="**">Collision Repair</a></li> <li><a href="**" >Heavy Frame Repairs</a></li> <li><a href="**">Truck Body Repairs</a></li> <li><a href="**" >Sprinter Repair Specialists</a></li> <li><a href="**">Commercial Van Repairs</a></li> <li><a href="**">Painting & Decaling</a></li> <li><a href="**">Custom Truck Body Services</a></li> <li><a href="**">Morgan Body Parts & Service</a></li> <li><img src="images/sidelinks_btm.gif" alt=" " width="200" height="10" border="0" /></li ></ul> 2 problems: 1) In IE and Firefox: gap between <img> and <li> 2) In IE6, a gap appears between all my <li>tags What to do? Do I have to put my <ul> in a <div> and keep my <img> out of the <ul>? If you look at Lakelandedc.com you notice the menu is very weird when trying to go from each link to the other links... how can i fix the menu so it is easier to navigate? Code: /* CSS Document */ #menu { text-align:left; width:155px; background-color:#084D9C; margin:0; padding:0; } #menu ul { list-style:none; margin:0; padding:0; } #menu a, #menu h2 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; display:block; border-width:1px; border-style:solid; border-top:solid 2px; border-color:#ccc #888 #555 #bbb; margin:0; padding:2px 3px; } #menu h2 { color:#fff; background:#BA5D92; text-transform:uppercase; } #menu a { color:#FFF; text-decoration:none; } #menu ul a:hover { color:#fff; background-color:#091F51; text-decoration:none; } #menu ul { position:relative; } #menu ul ul { position:relative; top:0; left:10%; width:100%; } s#menu a:hover { } .submenu { background-color:#9A1F61; color:#fff; } div#menu ul ul, div#menu ul ul li:hover ul ul { display:none; } div#menu ul:hover ul, div#menu ul ul ul li:hover ul {display: block;} What I'm trying to do... I have some navigation links, a few pictures, and someone's name on the left hand side of the page. I want everything except for the name to be at the top.... the name is to be at the bottom. Is there a specific way to accomplish this? The content area will generally extend as high as 600 or so px, so would like the name to appear at the very bottom lined up with the content box. Thanks. Not sure exactly what code you need to see, but here's the left hand column: CSS: Code: body {width:770px; height:100%; } .nav_links {vertical-align:top; width:150px; } .nav_links a{display:block; border-top:1px solid black; text-decoration:none;} HTML: Code: <!-- Left Nav Menu --> <div class="nav_links"> Link 1 Link 2 Link 3 Link 4 Link 5 </div> <!-- End Left Nav Menu --> <!-- Misc. Pictures (Left Column)--> <div> <div style="float:right;"> <img src="images/left_pic_1.jpg" alt="Pic1" style="width:50px; margin-bottom:10px;" /><br /> <img src="images/left_pic_2.jpg" alt="Pic2" style="width:50px;" /> </div> </div> <div style="clear:both;"> <div style="float:right;"> <img src="images/left_pic_3.jpg" alt="Pic3" style=" width:50px; margin-bottom:10px;" /><br /> <img src="images/left_pic_4.jpg" alt="Pic4" style="width:50px;" /> </div> </div> <!-- End Misc. Pictures (Left Column) --> <!-- Name --> <div class="name" style="vertical-align:bottom;"> First M. Last </div> <!-- End Name --> Hello to all of you, I am doing my first steps in respect to CSS programming and wonder if I can get some hint here. I have created a table, with two different line colors, and a changing line background color with hover. Basically everything works as expected - just the vertical-align command does not respond at all. Am I doing something wrong? What could be the reason, and how can I continue investigating? I am using the CSS stylesheet, in connection with a Joomla 1.5 CMS. Please see the code below: Code: table.general { text-align: left; vertical-align: top; width: 100%; border-collapse: collapse; } table.general th { text-align: center; font-size: 15px; color: white; font-style:bold; height: 30px; background-color:#95B3D7; border: 3px solid #FFFFFF; } table.general tr.row1 { background-color: #f1f1f1; } table.general tr.row2 { background-color: #e0e0e0; } table.general tr.row1:hover { background-color: #CCCCCC; } table.general tr.row2:hover { background-color: #CCCCCC; } table.general td { border: 3px solid #FFFFFF; padding: 4px; } The classes are being used in the following form: Code: <table style="width: 320px;" class="general"> <col span="4" width="80"></col> <tbody> <tr> <th>head A</th> <th>head B</th> <th>head C</th> <th>Alface</th> </tr> <tr class="row1"> <td>Topic A</td> <td>65</td> <td>215</td> <td>35</td> </tr> <tr class="row2"> <td>Topic B</td> <td>2</td> <td>2,3</td> <td>1,2</td> </tr> <tr class="row1"> <td>Topic C</td> <td>68</td> <td>55</td> <td>13</td> </tr> <tr class="row2"> <td>Topic D</td> <td>44</td> <td>50</td> <td>33</td> </tr> <tr class="row1"> <td>etc.</td> <td>494</td> <td>611</td> <td>238</td> </tr> </tbody> </table> Thank you in advance for your kindness! I'm trying to ensure the absence of the horizontal scroll bar within a div for all browsers. Is there a solution? overflow: -moz-scrollbars-vertical !important; only works in FF, but this is the effect I want. overflow-x and overflow-y only work in IE6 and below (right?), so does anyone know what to do for ie7 and safari and opera? |