CSS - Zack 990 Caption Border Help
Hi all,
I'm setting up a travel, photoblog for my trip around the world next semester (I'm a junior in college), and am having trouble getting the captions to match up on vertical images. Examples by clicking "more photos" on oliverwolfe dot net. I'm using the Wordpress CSS Theme Zack 990 Currently, the captions always set to 990 pixel-width, which fits perfectly with the theme and horizontals. For verticals, I want to know if there is a conditional statement I can add to the CSS so that, if I add a vertical image, the caption will change to 680 width. Thanks! Similar TutorialsI have an image that is float: right that I want a caption under. I read the Floatutorial and another float tuturial and thought I did what it said, but now the image floats left of the caption - sort of. I want the image to float left and the caption in dk blue to be beneath it. Here is the problem page Here is the css code for the float part: Code: .imgRight { clear: none; float: right; min-width: 100px; color: #3399FF; font-weight: bold; } .imgRight img { margin: 0px 0px 10px 20px; border: 1px solid #000099; overflow: visible; } Here is the xhtml code for the float part: Code: <p>Vitalograph Ltd was founded in 1963, building on a successful business in respiratory diagnostic and therapeutic products started in 1951. </p> <div class="imgRight"><img src="../images/p_model.jpg" width="275" height="182" alt="Vitalograph P Model Spirometer" /> 1966 Vitalograph P Model Spirometer</div> <p>Vitalograph achieved its early success by taking spirometry from a complex laboratory test to a simple effective screening procedure - with the key benefit of providing early detection, and therefore more effective treatment.</p> Hi, I try to use two div's to align a caption and a textbox for I don't want to use dozens of Code: between the two below ain't that good 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"> #the_textbox { position:absolute; border:1px #FF0000 solid; left:145px; top:0px; font-size:16px; font:"Courier New", Courier, monospace; text-align:left; width:90 } #menulist ul { position:absolute; left:6px; list-style-type:none; border:1px #FF0000 solid; font-size:16px; width:90; top:0px; } </style> </head> <body> <div id="menulist"> <ul> <li>Fname</li> <li>Lname</li> <li>Address</li> <li>Phone</li> <li>Gender</li> <li>BirthDate</li> <li>Nationality</li> <li>Marital Status</li> </ul> </div> <div id="the_textbox"> <form id="" name="" action="" method="post"> <input type="text" name="Input6" id="Input5" value="" size="25" /><br /> <input type="text" name="Input6" id="Input5" value="" size="25" /><br /> <input type="text" name="Input6" id="Input5" value="" size="25" /><br /> <input type="text" name="Input6" id="Input5" value="" size="25" /><br /> <input type="text" name="Input6" id="Input5" value="" size="25" /><br /> <input type="text" name="Input6" id="Input5" value="" size="25" /><br /> <input type="text" name="Input6" id="Input5" value="" size="25" /><br /> <input type="text" name="Input6" id="Input5" value="" size="25" /><br /> <input type="submit" value="Submit Registration"/> </form> </div> </body> </html> I'm trying to set up a box to hold an image and a caption. I thought it would be really easy, but I'm having huge difficulties... Here's what I want: A floating box contains my image and caption. It shrinks to fit the image width (which varies depending on the image), and the caption wraps onto new lines if needed. Simple, eh? Well, apparently not... I just can't get my text to wrap. If the line of text is longer than the image, it stretches the whole container. No matter how many workarounds I try! Can someone please tell me how it's done using CSS?! I wish to place a small image with a caption by its side in the middle of a div. What would be the better approach, (i)to put the two in a div and use absolute positioning or (ii)to use margins to position the two. Either way seems to work but I am looking for an approach that would be considered correct by a professional web developer. All help would be greatly appreciated. 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> <style type="text/css"> body { text-align: center; min-width: 1044px; margin: 0px; padding: 0px; font-family: arial; } #wrapper { position: relative; text-align: left; width: 1044px; height: 100%; margin: 0px auto; } #top-header-block { width: 1010px; height: 170px; background-color: cyan; } #top-header-block img { height: auto; width: auto; } #logo { float: left; } /*------------------------------------------*/ #inner-div { height: auto; width: auto; position: absolute; left: 567px; top: 41px; } #inner-div img { float: left; } #inner-div p { float: left; margin-top: 3px; margin-left: 5px; color: #0d2474; font-family: arial,sans-serif; font-size: 11px; font-weight: bold; } /*------------Alternative to above-------------*/ #img-B { float: left; margin-left: 315px; margin-top: 40px; } #top-header-block p { float: left; margin-top: 43px; margin-left: 5px; color: #0d2474; font-family: arial,sans-serif; font-size: 11px; font-weight: bold; } /*------------------------------------------*/ </style> </head> <body> <div id="wrapper"> <div id="top-header-block"> <a href="#"> <img id="logo" src="" alt="" width="248" height="65"/></a> <div id="inner-div"> <a href="#"> <img src="" alt="" width="66" height="20" /></a> <p>: 0 items</p> </div> <!-------------Alternative to above--------------------------------> <a href="#"> <img id="img-B" src="" alt="" width="66" height="20" /></a> <p>: 0 items</p> <!-----------------------------------------------------------------------> </div> </div> </body> </html> See the current solution here ... What I would like to do is dump the table, so that the images and captions wrap at screen width. I have been experimenting with CSS and <span>s but as yet haven't managed a similar formating. And ideas/solutions/pointers would be greatly appreciated Chris Jones URL Help, I'm trying to combine two effects I came across. The code works well but I have a problem when the image changes width. The caption box doesn't size accordingly. I tried multiple iterations for the transbox width without success. Any help would be greatly appreciated. Here is the code source: Dropshadow Image Caption Code: <html> <style type="text/css"> div.image_wrapper img { background-color: #fff; border: 1px solid #a9a9a9; display: block; margin: -5px 5px 5px -5px; padding: 4px; position: relative; } div.image_wrapper { background: url('_images/shadow.gif') no-repeat bottom right; clear: right; float: left; margin: 0 0 0 25px; padding: 0; position: relative; } .transbox { margin: 0; padding: 0px; background-color: #000; opacity:0.6; filter:alpha(opacity=60); position: absolute; top: 0; right: 11px; width: 95%; /*PROBLEM RIGHT HERE*/ height: 5em; } .image_wrapper p { margin: 0; padding: 10px; color: #FFF; position: absolute; top: 0; right: 5px; font-size: 36px; font-weight: bold; font-family:Georgia, "Times New Roman", Times, serif; text-shadow: 3px 3px 3px #000; } </style> <body> <div class="image_wrapper"><img src="_images/_main/HomePageGraphic.png" width="475" height="400" border="0" /><div class="transbox"></div><p>HOME</p></div> </body> </html> How's it going, If you look at this page, you'll notice that the text doesn't wrap around the image, but instead breaks after the caption just below the image: http://www.trophyfishingcharters.com/test/ Ideally, I want the text to wrap around the picture, with the caption remaining just below the photo. How can I pull this off? Thank you. 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> I'm a little puzzled by this weird display bug by IE7, this bug doesn't occur in IE6. It had to do with the DIV's CSS's border-style. If you set it to double then you notice some random bugs with it. Some of the time, the border is displayed without a problem. Some of the time, it is displayed with some gaps in the line as if it is not being drawn upon. Some of the other time, it is not displayed at all. I noticed if I switch from one tab to another then back, the border appeared as if nothing had happened. I also noticed that if I open the view source that overlapp the web browser then closed it, the border appeared as if nothing had happened. How do you fix that problem? Thanks... Hi, This used to be my solution: Code: <table border=1 bordercolorlight='#CCCCCC' Bordercolordark='#FFFFFF'> But this only works well on IE - not Mozilla Now I want to use CSS: Code: .results { border: 1px solid #CCCCCC ; } Code: <table class='results'> --------------- The problem is, with CSS, only the TABLE acquires the border property. The cells within it don't. If I specify Code: <td class='results'> for all the cells in the table, this also won't work, because the cell borders overlap each other and some border lines seem thicker than others (because of overlapping). Is there any simple way I can specify the border property for the table - in ONE declaration? I want the table and td borders all to be a simple 1px width ...is that possible in one declaration? Thanks a lot! I would like to set up a table with a different border than the cells inside it. Here's my code: 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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> TABLE {border: 1px solid black; border-collapse: collapse; width: 200px} TD {border: 1px solid #ccc} </style> </head> <body> <table> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> </table> </body> </html> That's all hunky dory in (gasp!) IE, but good browsers...they only show the lighter gray color. How do I get the table border to be different? How do you create an inner border around a table in css, rather than a "solid" border which creates a border line around the table on the outer half. The border needs to butt up against an image, rather than leaving a pixel space. This is the coder I have so far. Nothing big: Code: .solid { border: solid 1px #000000; } Thanks. Thanks for taking the time to read my question. I want to get rid of the right border on the last link but keep the borders on the rest of the <li>'s. I'm totally stuck. Thanks, Brad CSS: Code: #navcontainer ul { padding-left: 40px; margin-left: 0; background-color: #000000; color: #000000; float: left; width: 100%; font-family: arial, helvetica, sans-serif; } #navcontainer ul li { display: inline; } #navcontainer ul li a { padding: 0.2em 1em; background-color: #000000; color: #ffffff; text-decoration: none; float: left; border-right: 1px solid #fff; } #navcontainer ul li a:hover { background-color: #369; color: #fff; } li.LastOne a.ALastOne { color: red; } HTML: Code: <div id="navcontainer"> <ul id="navlist"> <!--<li id="active"><a href="#" id="current">Item one</a></li>--> <li><a href="#">Seminars</a></li> <li><a href="#">Stand-Up</a></li> <li><a href="#">Intro Psych</a></li> <li><a href="#">Selected Transcripts</a></li> <li><a href="#">Broadcast Archives</a></li> <li><a href="#">Pricing & Inquiries</a></li> <li class="LastOne"><a class="ALastOne" href="#">Links</a></li> </ul> </div> Hi, I am using blueBox class that makes a border. code: Code: <div class="blueBox" <table bgcolor="#FF3300"><tr><td> <div id="my_title" style="position: relative; width: 200px; height: 20px;" ></div> </td></tr> <tr><td>... My problem is that <div id="my_title" is causing right border of <div class="blueBox" disappear. When I change <div id="my_title" style="position: relative; to <div id="my_title" style="position: absolute; border is right where it should be. I do not want to use absolute positioning. What can I do about it? What is the problem? I can see that red background of the <table bgcolor="#FF3300"> does not even reach half of <div class="blueBox" Something is obviously pushing or covering right border of <div class="blueBox" Hi, I am trying to box around a text, but what happen is that when I setting up borders for it, it shows the box expand longer than the text. Is there a way to have the box just as big as the text (Well, slightly bigger, but just enough for the text)? I thought border-collapse:collapse would do it, but apperantly not. This is the CSS code I am using: PHP Code: div.submenu1 { position: relative; left: 22px; padding: 4px; border-style: solid; border-width: 0px 1px 1px 1px; border-color: #0000FF; border-collapse: collapse; background-color: #3399FF } And on the html it's: PHP Code: <div class='submenu1'> <a href='somelink' class='submenu1'>somelink</a> </div> I'm making a dashed border, and I was wondering how can I change the pixel size and color of the border? It's been awhile for me since I've used CSS or HTML but here's what I have(I know this isn't the proper formatting, but it's for a xanga site so the way it's entered doesn't really matter =\) <style="text/css"> #box { border-style:dashed; width:700px; position:absolute; } </style> <div id="box"> <div id="da"><p>Da..daa...da da Da</p> </div> <div id="muh"><p>muh numa nah</p> </div> </div> Hi, I'm a total newbie when it comes to .. well everything. HTML, CSS etc ... I'm working on a little site, but I have a problem on (apparantly I can't post the link to my site because I'm a new user.. ) In Firefox everything is OK. But in IE when I hover over the bottom Div's (delphi.exe file) and (Delphi-files) I get a solid border instead of a dashed border as I wrote down in the CSS. Any idea what the problem is? Is it needed for me to post the CSS file? Might be a little bit embarrasing as it's probably the most rediculous CSS file you've ever seen. Thank you for your time. So here's my css code Code: #top-div { border-top : 10px solid #FF8F00; width:100%; position:relative; top:-8px; } The intention is suppose to make an orange strip across the top of the page. The problem is that the left and right border of the div is not orange - specifically the top-right, top-left borders are not orange. So basically the strip is not stretch 100% from the otter most left to the otter most right side. Any advice? hi, i was wondering if it is possible to assign images for each border. something like border-top:5px dotted black; background-image:url(horBrdr.gif); border-left:1px solid red; background-image:url(verBrdr.gif); border-right: 2px groove green; background-image:url(horBrdr.gif); border-bottom:3px dotted #3399CC ; background-image:url(horBrdr.gif); vertical-align:middle; padding:1em;} of course this doesn't work. thanks for the help... Hey on my website: http://www.chamillionairechat.com I want there to be a border around the mainmenu and to look something like this: And this is the css i'm using for the mainmenu: Code: .mainmenu { background-color:#FFFFFF; padding-bottom:5px; border:1px border-color:#21511F; } So does anyone know what i'm doing wrong Thanks |