CSS - Remove The Space Between <img> And <td>
How can I remove the space between an image bottom and a td in Mozilla?
<!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><title></title> <style type='text/css'> td,img { padding:0px; border-width:0px; margin:0px; } </style> <script type='text/javascript'> </script> </head><body> <table border='1'><tr><td> <img src='http://www.kallery.net/Q_strg/kallery/85_153_1_1155924038.jpg' /> </td></tr></table> </body></html> Similar Tutorialshttp://users.wpi.edu/~sigep/goron2.html How would I remove the space around the images in the navbar so that they are all right next to one another and line up properly on the page? Hi I have a page that looks something like this Code: <style> #container { border: solid 1px #000000; width: 600px; padding: 10px; } #banner { height: 200px; width: 600px; background-color: #FF0000; font: bold 20px Arial, Helvetica, sans-serif; } #layer { position: relative; top: -198px; height: 196px; width: 150px; z-index: 1; left: 2px; background-color: #FFFFFF; } </style> <div id="container"> <div id="banner">Hello</div> <div id="layer">This is a layer</div> <p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. </p> </div> If you view that site, you will see that there is an empty space below the banner-div, which is reserved for the layer. I need to get rid of that empty space, in other words, I want the text to begin right after the banner-div. Any ideas how I can accomplish this? Using relative positioning for the text is not possible, because of the structure of the rest of the page (which I haven't pasted here). [edit] Floating the layer will work partially, the text will begin right below the layer, but there is still an empty space on the left side of the text - that has to go too. [/edit] All help is appreciated. Thank you in advance - Kimppa The website I created has a large blank space at the bottom. I want 30px between the bottom and the layout. At the top, I could create the space I want. Margin-bottom: 30px doesn't do the trick. I tried so many things but I just can't get it fixed. I think something is set too height or something? If someone could figure it out, I would be forever grateful! You can check out the site and css he I can't post the url because I'm a new user Can a mod post my url? EDIT: I have set the url as my homepage in my profile! Just click my username to check out the site. Hi, I have a list inside a div section. However for some reason there is some space srounding this list. The div has a padding of 5px. I want to remove the space of the list so that the actual list is only 5px away from the div border. Here is some html and CSS code of what I did so far: Code: <html> <head> <style> #box { width: 200px; border: 1px solid #000000; padding: 5px; } #box ul li{ padding: 0; } </style> </head> <body> <div id="box"> <ul> <li>One</li> <li>Two</li> <li>Three</li> </ul> </div> </body> </html> I also tried margin: 0px, however that was a disaster. And also tried clear:both but did not work either. Does anyone have any sugestions? thanks and regards, sim085 Hi there, Not entirely sure this is a CSS issue, but something tells me it is... I'm getting a weird space at the top of my pages in IE, which consequently causes the header to not align properly with the header background image. It works just fine with FireFox though. You can view the issue he http://hsdc.groundedgroup.com/ Does anybody know how to remove this space? Thanks in advance. I'm having a "can't think" day. How would I get rid of the space(s) between the image icon and the <li> folder or file name on my test website? On the left-hand side of my test website, there is a directory tree listing. You'll see that php files are indicated with an php file icon for example. I don't want that much space between the file name and the file icon. Test website: www seemyinvestments dot com I'm working on a custom MovableType site for a sports news company, and after including FCKeditor into the backend to allow for more freedom in styling, etc, I've found that the css styles for the blog entries and the output from the editor just don't mix. Is there some way I can clear all the inherited css definitions and just let the text display as itself? Hello. There is a small gap between my input and image, see attached screenshot. i thought it might be the image dimensions but it isn't; and I've removed margins, padding, etc. What property should I be looking for please? Here's some css: Code: html, body, div, p, form, fieldset, input, img { margin: 0; border: 0; padding: 0; line-height: 1; } input { border: 1px solid gray; } . txtImage { vertical-align: text-bottom; } #frmCourse { width: 500px; height: 500px; margin: 5px; padding: 5px; outline: 1px solid gray; } #fldCourse { width: 80%; padding: 5px; margin: 0 auto; border: 1px solid #808080; } # inpCourse { height: 20px; border: 1px solid #808080; vertical-align: text-bottom; } Thanks for taking the time to read my question. I'm having a bit of a brain stall here. I want to get rid of the border around the href image, using css. How???? Code: <div class="Valid"> <p> <a class="ValidLink" href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a> </p> </div> Thanks, Brad Hi, I remember reading that there is a css attribute for removing all browser-specific formatting from an element, for example forms, H tags and divs (which are pre-formatted differently in ie and firefox) but I can't recall what it was! Does anyone know how this is achieved as I find it very laborious when creating stylesheets to have to remember to reset all of these elements' formats. - before anyone says it, I know I could set up a generic, cross-browser-ready stylesheet for use with all my sites, and this is a system I already employ, I am simply concerned with saving bytesize and achieveing smaller stylesheets that are more easy to work with. I remember it was something like this: instead of: form{ margin:0px; padding:0px; } I'm sure you can do something like: form{ preformatting:none; } Does anyone know what I'm talking about? Or did I dream it?... cheers in advance I'd like to be able to remove all unused css styles on a website and the FireFox add-on "Dust-me Selectors" is highly recommended, only that it doesnt support FireFox 4 which is what is installed for me at the moment, can you please confirm if I can have more than 1 instance/version of a web browser/FireFox on my machine, or if you could recommend another way of finding unused css on the whole of a website, and not just one page, thanks plenty in advance.. This is driving me crazy!!! The headings elements (h1, h2, etc) have this padding or margins above them, and I can't get rid of it. here's an example http://my-test-site.comli.com/high-type.html I've tried to reset the padding and margins to 0. With no change. Any ideas Hi guys, I know most of you are probably not familiar with the blogger code, but I wanted to see if I code post some bits of code and maybe you can help me with my problem. My problem is, is that I'm trying to add a google adsense search bar in the header of my blog (www.mytechnicalinterviewexperience.com). Here is the piece of code that initially defines the header: Code: #header-wrapper { background:$titleBgColor url("http://www.luckyninedesign.com/tech/header.gif") no-repeat $startSide top; margin-top:22px; margin-$endSide:0; margin-bottom:0; margin-$startSide:0; padding-top:8px; padding-$endSide:0; padding-bottom:0; padding-$startSide:0; color:$titleTextColor; height:105px; } So in blogger, you can make it so you can add a "widget" to the header, and in that widget is where I'll be able to put my adsense code. However, when I add the widget, the adsense search bar appears, but it also puts the background image that I have defined for #header-wrapper. Here is the code that appears after I add the widget: Code: <b:widget id='HTML2' locked='false' title='' type='HTML'> <b:includable id='main'> <!-- only display title if it's non-empty --> <b:if cond='data:title != ""'> <h2 class='title'><data:title/></h2> </b:if> <div class='widget-content'> <data:content/> </div> <b:include name='quickedit'/> </b:includable> </b:widget> Basically, I just want to add a new widget to the header without having the header background appear again. Is there any code I can add here that says, don't have the background appear? I've tried removing the if statement but it does not work. If there is anything else I can provide you with, let me know. Any help would be much appreciated, thanks. Joe When I allow scripts and active x to run in IE I get a dotted border around each letter of hyperlinked text. It looks fine in other browsers and also in IE if I block scripts. Does anybody have any ideas how to fix this or if it really is a CSS problem? Thanks Below is some code I scraped from a page in my application using firebug. The current code displays a series of row with what appears to be a blank row in between. I'm trying to figure out how I can reduce the vertical space. Thanks In Advance! <tr> <td class="PTSection"> <table class="PTSectionTable" cellspacing="0"> <tbody> <tr> <td class="PTSection"> <table cellspacing="0"> <tbody> <tr> <td cid="saw_11382_14" s="-1" l="0" e="3"> <table id="saw_11382_14_3_0" class="PT_VSGHT" cellspacing="0px" cellpadding="0px" border="0" onmousedown="PTPSS(event, this); return false" cid="saw_11382_14" s="-1" l="0" e="3"> <tbody> <tr align="right" style="width:10px;"> <tr align="right" style="width:10px;"> <tr align="right" style="width:10px;"> </tbody> </table> </td> <td id="saw_11382_14_3_0_Grp" class="PTCLDC" style="visibility:collapse"> </td> <td> <table id="saw_11382_14_3_0_Tbl" cellspacing="0" cid="saw_11382_14" s="0" l="0" e="3"> <tbody> <tr> <td class="PTPSHLC" style="font-family:Arial Black;">Non-Sponsored Description:</td> <td> </td> <td class="PTSC OOLT">Stein IREE "Co2 Recycling"</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </td> </tr> <tr> <td class="PTSection"> <table cellspacing="0"> <tbody> <tr> <td cid="saw_11382_14" s="-1" l="1" e="3"> <table id="saw_11382_14_3_1" class="PT_VSGHT" cellspacing="0px" cellpadding="0px" border="0" onmousedown="PTPSS(event, this); return false" cid="saw_11382_14" s="-1" l="1" e="3"> <tbody> <tr align="right" style="width:10px;"> <td class="PT_CHPHT"> </td> <td class="PT_VGHL" rowspan="3" style="display:none">Fund Code:</td> </tr> <tr align="right" style="width:10px;"> <tr align="right" style="width:10px;"> </tbody> </table> </td> <td id="saw_11382_14_3_1_Grp" class="PTCLDC" style="visibility:collapse"> </td> <td> <table id="saw_11382_14_3_1_Tbl" cellspacing="0" cid="saw_11382_14" s="0" l="1" e="3"> <tbody> <tr> <td class="PTPSHLC" style="font-family:Arial Black;">Fund Code:</td> <td> </td> <td class="PTSC OOLT">Business and Industry</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </td> </tr> Is it possible to remove the embossed bored from a select box. That is just destroying the whole look of my page and i there is a way please let me know. Nick Hi, I need to lay down two images side-by-side in an absolutely positioned div, but they always have a gap between them. I am guessing there is some inherent padding in an image, much like in a <p>, but I can't get rid of it. Qualifiers: 1. The containing DIV is absolutely positioned, but I do NOT want to absolutely position the images within. I want them to be inline, so they lay across the div horizontally. 2. As follows from above, I want the images inline, not block. Basically, I want to control the images, I think there is padding there I cant see, I would like to know how to remove the padding. Here is my test page: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html > <head> <title>Mind the Gap</title> </head> <body> <p style="position: absolute; top: 250px;">Desired code style</p> <div id="bottomAds" style="position: absolute; left: 0px; top: 297px; background-color: orange; width: 760px; height: 90px;"> <img id="leftImage" alt="sorry cnn" style="border-width: 0; padding: 0; margin: 0; border: none;" src="http://i.a.cnn.net/cnn/.element/img/1.3/ceiling/logo.cnn.com.gif" > <a style="border: none; margin: 0; padding: 0;" href="http://www.cnn.com"><img alt="sorry cnn" id="adImage" style="margin: 0; padding: 0; border: none; border-width: 0; " src="http://i.a.cnn.net/cnn/.element/img/1.3/ceiling/logo.cnn.com.gif"></a> </div> <p style="position: absolute; top: 450px;">Desired Result</p> <div id="Div1" style="position: absolute; left: 0px; top: 497px; background-color: orange; width: 760px; height: 90px;"> <img id="Img1" alt="sorry cnn" style="display: block; float: left;" src="http://i.a.cnn.net/cnn/.element/img/1.3/ceiling/logo.cnn.com.gif" > <a style="border: none; margin: 0; padding: 0;" href="http://www.cnn.com"><img alt="sorry cnn" id="Img2" style="border: none;" src="http://i.a.cnn.net/cnn/.element/img/1.3/ceiling/logo.cnn.com.gif"></a> </div> </body> </html> Thanks for looking at this, and for any tips. CJB Hi, Is it possible to remove the border from a select box? Many thanks I created this code for document lists, and have recently been trying to tighten up my code. But one issue I cannot figure out, is how to fix the flickering I get when viewed in IE. The flickering doesn't happen in Firefox. css style sheet example page html: Code: <a class="listurl" href="http://www.yahoo.com" target="_blank"><div class="listitem"><div class="listtitle"><ul><li> <strong>Link Example</strong><br> <br>Click here to open a pop-up window to yahoo.com </li></ul></div><div class="listimage" style="background-image: url(http://www.mycodez.org/images/icon-netlink.gif);"></div></div> </a><div style="clear:both;"></div> related css: Code: div.listitem { float: left; width: 500px; background-color: White; height: auto; a: expression(onmouseover=new Function("this.style.backgroundColor='#B0C4DE'; this.style.color='#000000';"), onmouseout=new Function("this.style.backgroundColor='#ffffff'; this.style.color='#000000';")); margin-bottom: 0px; cursor:pointer; z-index: 2 } div.listitem:hover { background-color: #B0C4DE; color: #000000; margin-bottom: 0px; z-index: 2 } div.listtitle { float: left; width: 400px; height: inherit; margin-top: 5px; margin-bottom: 0px; position: relative; vertical-align: middle; z-index: 1 } div.listimage { float: right; width: 100px; height: 60px; background-position: center; vertical-align: middle; margin-bottom: 10px; margin-top: 10px; background-repeat: no-repeat; z-index: 1; } any help will be greatly appreciated. Hi, Trying to get this widget to disappear using responsive design when the browser is less than 800px. I'm using WordPress and the theme is already responsive. Here's the media query in the style sheet now: @media only screen and (max-width: 800px) { /* and I added this part below (not working!) */ .page-title .widget-area { display:none !important; } } Please see http://simplemethod.ca to check it out. I'm trying to remove my big fancy title widget with the signup form in it (since it breaks in an ugly way when the responsive design kicks in!) Thanks for helping friends. I hope my post made some sense! Perhaps I'm using the wrong class names for the style change... This part has got me a bit stumped. Best Regards, Drew |