CSS - Weird Display Of Images
I really need help here.
I'm using some php script to generate the pictures and titles as seen below: img30.imageshack.us/i/capture1ar.jpg/ (can't post images or urls =/) I styled it using CSS and the CSS portion turned out something like these: PHP Code: div.related-posts {clear:both; text-align:center; margin:10px 0px 0px 0px; padding:0;} div.related-posts li{width:150px; float:left; margin-right:15px; padding:0;} div.related-posts img{clear:both; padding:5px; background:#F7F7F7; border:1px solid #DDD;} div.related-posts a{display:inline-block; border:none; text-decoration:none;} div.related-posts li{font-size:12px;} This is somewhat how the thing is displayed: PHP Code: <li> <//a href="article link" rel="bookmark"> <img src="image" alt="Example post 3" /> </a> <li> <//a href="article link" rel="bookmark"> <img src="image" alt="Example post 3" /> </a> Weirdly though, only if the first image has a title that is two lines long, the image placement gets screwed up. If the first and last image does have two lines, everything seems right! This is killing me!!! HELP. =/ I ain't a CSS coder or php genius, in fact i do not have much knowledge in this field and more likely a copy-paste-edit kind of person. So the css and and php code is copied and edited from someone else. Any ideas to make sure everything is inline? Similar TutorialsHey, at my site: http://www.optimumnutrition.com/products in IE/6 I am having a problem with the last side box in the left column. You can see a gap between the link to conditions of use and the curved bottom of the box. Anyone see where this is coming from? Thanks, Ryan hey, i have a page that includes several flash files.. since its a translation company i have made a page in Russian but the upper flash menu refuses to appear in firefox but displays in internet explorer.. other flash files appear.. and i don't know if its related but in order to make the Russian appear correctly i had to save the php page as utf-8 with no BOM... appreciate any help since i am clueless as to this weird problem here is the page address : bit.ly/4SqdNw sorry new in the forums could not link it but copy and pase I use css to code my web layout and I also can view all images on Dreamweaver. However, when I view my web layout on Browsers( Firefox, IE), nothing appears. My code for HTML is: Code: <html> <head> <title>Hung</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" type="text/css" href="/template/style.css"> </head> <body> <div id="container"> <div id="header"></div> <div id="menu"></div> <div id="whitebody"> </div> <div id="footer"></div> </div> </body> </html> And MY CSS CODE is: Code: body{ color:#FFF; margin: 0px; padding:0px; } #container{ background-position:center; } #header{ background:url(/template/images/header.gif); background-repeat: no-repeat; width: 800px; height: 80px; } #menu{ background-image:url(/template/images/menu.gif); background-repeat:no-repeat; width: 800px; height: 55px; } #whitebody{ background-image:url(/template/images/backgroundbdoy.gif); background-repeat:no-repeat; width: 800px; height: 441px; } #footer{ background-image:url(/template/images/footer.gif); background-repeat:no-repeat; width: 800px; height: 24px; } If the paths of images are wrong, I can not view on Dreamweaver but I can. What wrong have I done ? please let me know and possibly give me a solution as you can. Thank you very much. hello, I want the right arrow to be displayed on the same line as the slide show. Any suggestions as to how to do so? below is the CSS and the HTML. Here is the html 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> <script src="http://cdn.jquerytools.org/1.1.2/jquery.tools.min.js"></script> <link type="text/css" href="scrollable.css" rel="stylesheet" /> <script> // execute your scripts when the DOM is ready. this is a good habit $(function() { // initialize scrollable $("div.scrollable").scrollable(); }); </script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> .leftbutton {width: 30px; float:left; margin-top:30px;} .rightbutton {display:inline;} </style> </head> <body> <!-- "previous page" action --> <a class="prevPage browse left leftbutton"><img src="left.png" /></a> <!-- root element for scrollable --> <div class="scrollable inline"> <!-- root element for the items --> <div class="items"> <!-- 1-5 --> <img src="http://farm1.static.flickr.com/143/321464099_a7cfcb95cf_t.jpg" /> <img src="http://farm4.static.flickr.com/3089/2796719087_c3ee89a730_t.jpg" /> <img src="http://farm1.static.flickr.com/79/244441862_08ec9b6b49_t.jpg" /> <img src="http://farm1.static.flickr.com/28/66523124_b468cf4978_t.jpg" /> <img src="http://farm1.static.flickr.com/164/399223606_b875ddf797_t.jpg" /> <!-- 5-10 --> <img src="http://farm1.static.flickr.com/163/399223609_db47d35b7c_t.jpg" /> <img src="http://farm1.static.flickr.com/135/321464104_c010dbf34c_t.jpg" /> <img src="http://farm1.static.flickr.com/40/117346184_9760f3aabc_t.jpg" /> <img src="http://farm1.static.flickr.com/153/399232237_6928a527c1_t.jpg" /> <img src="http://farm1.static.flickr.com/50/117346182_1fded507fa_t.jpg" /> <!-- 10-15 --> <img src="http://farm4.static.flickr.com/3629/3323896446_3b87a8bf75_t.jpg" /> <img src="http://farm4.static.flickr.com/3023/3323897466_e61624f6de_t.jpg" /> <img src="http://farm4.static.flickr.com/3650/3323058611_d35c894fab_t.jpg" /> <img src="http://farm4.static.flickr.com/3635/3323893254_3183671257_t.jpg" /> <img src="http://farm4.static.flickr.com/3624/3323893148_8318838fbd_t.jpg" /> </div> </div> <!-- "next page" action --> <a class="nextPage browse right rightbutton"><img src="right.png" /></a> </body> </html> Here is the CSS: Code: /* root element for the scrollable. when scrolling occurs this element stays still. */ .scrollable { /* required settings */ position:relative; overflow:hidden; width: 680px; height:120px; /* custom decorations */ border:1px solid #ccc; background:url(/img/global/gradient/h300.png) repeat-x;} /* root element for scrollable items. Must be absolutely positioned and it should have a extremely large width to accomodate scrollable items. it's enough that you set the width and height for the root element and not for this element. */ .scrollable .items { /* this cannot be too large */ width:20000em; position:absolute; clear:both; } /* single scrollable item */ .scrollable img { float:left; margin:20px 5px 20px 21px; background-color:#fff; padding:2px; border:1px solid #ccc; cursor:pointer; width:100px; height:75px; -moz-border-radius:4px; -webkit-border-radius:4px; } /* active item */ .scrollable .active { border:2px solid #000; z-index:9999; position:relative; } I am working on a drupal site and I having problems getting some images in a block to display inline. I am able to effect some of the aspects of the images (they are list items in a ul) but I can't get them to display inline. Here is the html from the source: <div id="block-views-recent_images" class="block block-views"> <div class="blockinner"> <h2 class="title"> recent images </h2> <div class="content"> <div class='view view-recent-images'><div class='view-content view-content-recent-images'><div class="item-list"><ul><li><div class='view-item view-item-recent-images'><div class='view-field view-data-node-data-field-user-images-field-user-images-fid'><a href="/image-upload/admin/05-sep-2007/204"><img src="(xxxxxx) image_0.jpg" alt="" title="" /></a></div></div> </li><li><div class='view-item view-item-recent-images'><div class='view-field view-data-node-data-field-user-images-field-user-images-fid'><a href="/image-upload/admin/05-sep-2007/201"><img src="(xxxxxxx) image.jpg" alt="shack" title="some image" /></a></div></div> </li></ul></div></div><div class='more-link'><a href="/recent_images">more</a></div></div> And here is the css that I have attempted so far: #block-views-recent_images { background: #EBE9ED; } #block-views-recent_images li{ list-style-image: none; list-style-type: none; padding: 0; margin: 0; display: inline; } I am new to CSS so I know I may have taken a completely wrong approach. Thanks for any suggestions on how to get the images to display inline. Thanks Hey, I have a feeling that this will not be difficult to solve, but I've come to the point where I don't really know what to do any more. They say two heads are better than one; that's why working in a team is so great, because there are people from different walks of life. So, any help you can provide me from your experiences would be great! I have five buttons that do not show up on firefox, and the images are called into play through CSS using background. You will find the code below: This is the CSS: Code: .borderBelowNav { position: absolute; top: 0; left: 80px; width: 937px; height: 141px; z-index: 2; } img.borderBelowNav { display: block; margin-left: auto; margin-right: auto; } .divNav { position: absolute; top: 55px; left: 175px; width: 785px; height: 61px; z-index: 3; } ul#mainNav, ul#mainNav li { margin: 0; padding: 0; } ul#mainNav li { display: inline; } ul#mainNav li a { width: 138px; height: 69px; } ul#mainNav li#quienesSomos a { width: 138px; background: url(../images/quienesSection.gif) no-repeat 0 0; top: 0; left: 0; } ul#mainNav li#quienesSomos a:hover { background-position: 0 -72.9px; top: 0; left: 0; } ul#mainNav li#campamentos a { width: 138px; background: url(../images/campamentosSection.gif) no-repeat 12px 0; top: 0; left: 0; } ul#mainNav li#campamentos a:hover { background-position: 12px -71.2px; top: 0; left: 0; } ul#mainNav li#noticias a { width: 150px; background: url(../images/noticiasSection.gif) no-repeat 14px 0; top: 0; left: 0; } ul#mainNav li#noticias a:hover { background-position: 14px -72.5px; top: 0; left: 0; } ul#mainNav li#aplicacion a { width: 150px; background: url(../images/aplicacionSection.gif) no-repeat 0px 0; top: 0; left: 0; } ul#mainNav li#aplicacion a:hover { background-position: 0px -76.1px; top: 0; left: 0; } ul#mainNav li#contactos a { width: 150px; background: url(../images/contactosSection.gif) no-repeat 0px 0; top: 0; left: 0; } ul#mainNav li#contactos a:hover { background-position: 0px -72.2px; top: 0; left: 0; } This is the HTML: Code: <img class="background" src="images/treesInFog.jpg" alt="" /> <img class="innerBackground" src="images/bgroundmain02.jpg" alt="" /> <!--This div is for the black border behind the nav--> <div class="borderBelowNav"> <img class="borderBelowNav" src="images/borderBelowNav.jpg" alt="" /> </div> <div class="divNav"> <ul id="mainNav"> <li id="quienesSomos"><a href="quienesSomos.php" title="Quienes Somos"> </a></li> <li id="campamentos"><a href="campamentos.php" title="Campamentos"> </a></li> <li id="noticias"><a href="#" title="Noticias"> </a></li> <li id="aplicacion"><a href="aplicacion.php" title="Aplicacion"> </a></li> <li id="contactos"><a href="#" title="Contactos"> </a></li> </ul> </div> PROBLEM: I create a nice button using the sliding doors technique for rounded corners. But the button displays with 100% width unless I float it. My layout requires that the buttons be inline with the text, so floating won't work. Anyone know an alternative? I wouldn't mind floating but I want the button to show inline with the text. When I use float:left, it removes it from the inline flow. Basically, I want a very modular button that can be used in several different places on a page. In many cases, floating is fine because the mockup has it out of the inline text, but I want to use it there, too. Here's the HTML: <a class="button" href="#"><span>Update Profile</span></a> Here's the css: a.button:link, a.button:visited { background:url(button_right.gif) no-repeat right top; } a.button span:hover, a.button span:active { background:url(button_left_hover.gif) no-repeat right top; } a.button span { background:url(button_left.gif) no-repeat left top; color:#fff; cursorointer; display:block; height:20px; line-height:20px; margin:0 2px 0 0; padding:0 10px; position:relative; white-space:nowrap; } Hi, I'm having a slight problem with my css. I want to display a comment with a number of images to the right of it. e.g "Excellent" plus 5 stars next to it (note: images of stars) so i tried this: Code: <div id = "commentText"> Excellent </div> <div id = "star"> </div> <div id = "star"> </div> <div id = "star"> </div> <div id = "commentText"> Fantastic </div> <div id = "star"> </div> <div id = "star"> </div> <div id = "star"> </div> <div id = "star"> </div> css Code: #commentText { font-size: 100%; color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; padding-left: 30px; } #star { display: inline; height: 24px; background-image: url(images/star.png); background-repeat: no-repeat; padding-left: 20px; } I currently have comment with 3 stars displayed underneath it - however they are only half being shown for some reason. Any help is appreciated to help me get the desired effect. Thanks! omg I am going to fall from the window with this stupid language lol... Until yesterday, I was designing properly my site, using css and linking it in my php properly andddddddd.......... today I noticed a weird result. When I change something in css, I can see no result in the site. Even if I delete code from css, the site seems to be cached! I use Mozilla, I tried to clean cache, the css is properly linked... whats going on now Have anyone else faced a similar problem?... Hey everyone, I have an odd problem. CSS Code: Original - CSS Code ul#admin_menu li.am_item{ float:left; clear:none; display:inline; border:0; padding:0; margin:0; width:24%; } ul#admin_menu li.am_item{ This works... CSS Code: Original - CSS Code li.am_item{ float:left; clear:none; display:inline; border:0; padding:0; margin:0; width:24%; } li.am_item{ This doesn't work... I don't understand why. What gave it away was the display:inline; The first one displays them inline, the second displays them block and they don't get their width. if you check out this website you'll immediately understand what the problem is about. The script I wrote, pulls pictures out of a database and displays them. I have a print feature (click the link that says: Ik wil de klassenlijst van **** afprinten). With Css I check wether or not a picture can be displayed on this page or if it has to be forced onto another page, when printed. Code: <style type="text/css" media="print"> table { page-break-befo auto; } </style> When you check the webpage, you'll notice this row gives problems in IE. When I print the page from Internet Explorer: this row shows on the page, but not the picture that goes along with it. When I print the page from Mozilla: this row does not show on the page, neither the picture that goes along with it. as it should be Can someone help me? It is very important that the pagebreak is automagically forced when printed, because I can't guess the format on which people will print. Hey gang, quick question. I'm tring to make a "Thermometer" of sorts for my site, and instead of making lots of images in photoshop, I figured I could do it a little more dynamicly using divs and css. I was right, as Firefox displays my code perfectly, however, IE messes up the whole thing by keeping the allocated space for the one div in the place where its positioned in the code. Dumb thing. I figure it has something to do with the display property, but I'm not sure which to use. Any suggestions? Thanks! PHP Code: <div style="height: 500px; width: 100px; padding: 0px; margin: 0px; border: 0px black solid; background: url('meter_color.jpg');"> <div style="position: relative; top: 0px; left: 0px; height: 125px; width: 100px; padding: 0px; margin: 0px; background: #FFFFFF; z-index: 1;"></div> <div style="position: relative; top: -125px; left: 0px; height: 500px; width: 100px; padding: 0px; margin: 0px; background: url('mask.gif'); z-index: 2;"></div> </div> (images attached) -Jim I've got a body of text within a DIV tag. For some reason, if I roll my mouse over the text, the entire body of text changes color as if it were a link. I've double checked to see if there are any open HREF tags but there are none. Any ideas? Safari 1.3 on Mac OSX 10.3.9 if it matters. I've also tested on Netscape, Opera, Firefox and IE and all of these work fine. here be the code: Code: .mainBody { color: #000; font-family: helvetica, arial, "sans serif"; font-size: 12px; text-align: justify; padding-left: 35px; padding-right: 35px; } .mainBody:link, .mainBody:visited { color: #600; text-decoration: underline; } .mainBody:active, .mainBody:hover { color: #996600; text-decoration: none; } .pageLinks { color: black; font-family: helvetica, arial; font-size: 14px; text-align: center; } .pageLinks:link, .pageLinks:visited { color: #960; text-decoration: underline; font-size: 14px; } .pageLinks:active, .pageLinks:hover { color: #960; text-decoration: none; font-size: 14px; } Hi, I'm trying to display text in a floating div in the middle of the page. The style is as follows: Code: .mainContentAreaBackground { position:absolute; z-index:11; top: 190px; left: 230px; width:70%; height:72%; } #mainContentArea{ z-index:12; position:absolute; overflow:auto; overflow-x:hidden; width: 67%; height: 68%; top:205px; left:246px; text-align:left; font-family:Tahoma; font-size:10.0pt; visibility:visible; } There are two anomalies which I think might be bugs in IE's implementation of CSS, and I was hoping someone might be able to give me some advice as to how to get around them. The first problem is that, when going to highlight text in the main content area, all objects on the page are selected, rather than just the intended text. The second anomaly is that, when using the mouse wheel to scroll down in the mainContentArea div when there's overflow, the cursor needs to be hovering over text. If it's hovering over any place with a "hole" in it, such as the space between paragraphs, then it will not scroll. Everything works fine in Firefox. You can see what I'm talking about he http://www.cs.mcgill.ca/~jbeard4/lepdev If anyone has any advice, please let me know. Thanks! -Jake So I have the following website: http://www.itmustbecollege.com/ and it has a problem SOMEWHERE that I can't seem to figure out. The problem is that all of my pages now have a big "space" on the far right, forcing a huge horizontal size. I have tried to debug but can't seem to find out the exact problem. It is weird, because certain parts of the website have a "width: 100%" yet ENDS at the correct look, yet there is still that huge space! I have a basic 2 column layout with a header and the columns reprezented by two floated divs but on IE I'm experiencing some weird behaviour with the menu. To be precise the menu's background and content is not showing up at pageload and I have to hover some of it's elements or resize the window, or bring another window above IE's window and then the hidden elements magically appear. Is this some common bug? And more important: is there a fix? You can see my example at the following link -> http://www.link7.ro/misc/css-stuff/bug1/test.html Thanks in advance. Hello, I have a free text search with auto suggestion that opens below the input box. I finally managed to make it look good in all browsers, but I have one problem left in IE - when the auto suggestion div opens with the options and I press the down arrow to move down the list, there is a little jump. You can see it by going to : bateries.websitebuildingsolutions.com in IE and enter "b1" in the search box, wait a second for the div to open and than press the down arrow to move down the list. What can I do to fix this? Thanks The border around the fieldset in IE7 is messed up. The right border is shifted to the left several pixels. It looks fine in IE6. In FF the border isn't shifted but there is less padding on the right side of the fieldset than the left. I can't figure that one out either. If I zero out all the padding & borders the input/textareas push a few pixels out the right side of the fieldset. Looks fine in IE6. So has anyone seen either of these issues and might know how to correct them? Here is the page in question Thanks! |