CSS - Who Is Right: Firefox Or Ie?(rendering Inside Iframe)
here is a html page with iframe (index.html):
Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>iframe</title> <style type="text/css"> #framebox{ width:200px;height:150px; border-style:solid;border-color:#000;border-width:1px; } </style> </head> <body> <div> <iframe id="framebox" name="framebox" src="iframe.html" marginwidth="0" marginheight="0" frameborder="0"></iframe> </div> </body> </html> and this is a iframe page(iframe.html): Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title></title> <style type="text/css"> #text{ background-color:#00f; border-style:dotted;border-color:#f00;border-width:1px; } </style> </head> <body> <div id="text">sample text sample text sample text sample text</div> </body> </html> run this example. the text inside #text(the div inside iframe page) is intentionally written with and iframe is given specific width and height to make iframe scroll. What happens in firefox(in opera too) is that #text div does not strech to fill entire text string but instead has width equal to width of iframe and the text kind of overflowing the div. But in ie #text div is expanding to include entire text string. IMHO is that in this specific case ie seems to be right... well, i know that ie wrongly expands containers dimentions if content is too big BUT not in this case... #text div DOES NOT have any stated dimentions so that means that i want it to adopt for whatever dimensions the content has... What do you think? Similar TutorialsHi I am completely stumped by this. My CSS is not rendering in FF, I am running FF on a mac. Two pages, they are nearly the same, but show one display Css and the other does not - No CSS and With CSS I have been going crazy trying to find out what is wrong. The CSS link is here Thanks Jake All I am trying to do is pad some text so that it is aligned vertically, but whenever I pad the text, in Firefox, it forces the parent div up, instead of the text down, which makes no sense Code: body { margin: 0px; font-family: Verdana, Arial, Helvetica, sans-serif } #logoimage { margin: 5px 0px 2px 5px } #version { font-size: 10px; font-weight: bold; margin: 4px 5px; text-align: center; position: absolute; top: 20px; right: 15px } #header { background-color: #D2E1FA; height: 20px; position: relative } #navigation { font-size: 11px; position: absolute; top: 2px; left: 20px } #userinfo { background-color: #FFFFFF; height: 13px; width: 150px; color: #000000; font-size: 10px; margin: 4px 5px; text-align: center; position: absolute; top: 0px; right: 150px } Actual html is here... Code: <img id="logoimage" src="/images/logosmall.gif"> <div id="version"> Beta Build 1000 </div> <div id="header"> <div id="navigation"> Test My Account </div> <div id="userinfo"> <b>Guest User</b> > Log In </div> </div> It actually pushes the div almost until it overlaps the image above, which makes no sense... How should I be applying the padding instead? thanks in advance! one of my client's pages is not rendering my external css in mozilla firefox. the page's index is: (URL address blocked: See forum rules) It is in a frameset... the simplest page on my site is (URL address blocked: See forum rules)/leftspacer.html. I cannot get the stylesheet to put the background image in proper alignment. PLEASE HELP! hello. i'm using a CSS tutorial and DREAMWEAVER to build a website. i find that the site is interpreted the way i would like it in either Firefox or Safari...but not in IE. When links are hovered over while using IE, the page distorts. has anyone experienced this type of problem before? thank you in advance for your time and assistance! i did post several explanatory screenshots to illustrate the problem. replace each "@" with a period. mea culpa. www@wwpea@net/screenshots@htm Hey folks, here's an odd problem that's got me totally stumped. I've got a nine item unordered list, each of which is a link that contains both text and a background image. The background image is a large spritebox. I'm using background-position to shift the spritebox to display the sprite specific to the a:link and also to display a separate a:hover version. Looks great in Safari and CSSEdit, but in Firefox four of the links are misplaced and the sprite is incorrect. The hover state is correct, however. This is hard to explain, but the example should help illustrate the problem. My thought was that it was related the psuedo class of a:link, but nothing I've tried seems to help. Any thoughts? The example file contains both the HTML and the CSS (just to simplify this problem for this forum). The full background image and the file containing the sprites is at my website, artmeetsearth dot org slash 2011 slash codetest dot html. To get the image type socialmediaicons.jpg instead of codetest. Thanks for any help you can offer! Is it possible to overide a websites default css when you display it in an iframe? if so how is this done? I have found the following javascript but it doesn't seem to do anything (maybe im using it incorrectly...) Code: var cssLink = document.createElement("link") cssLink.href = "test.css"; cssLink .rel = "stylesheet"; cssLink .type = "text/css"; frames['tbl'].document.body.appendChild(cssLink); i have an iframe that points to some random ad pages, but the ads that come up are basic html and the browser gives them some default padding. is there a trick (besides editing the actual HTML in those ad pages) to make that padding go away? So I have an ad that is being served via an IFRAME. The src of the iframe has a few places where I can change colors as the css is dynamic based on the query string. There is one css element that is not supported with the user option to change the color and I want to try and override it. Obviously inline styles override embedded styles, but the element I need to override is span.price { color:#990000; } and that is within the source of the iframe. Is there a way to override this? I have an iframe that contains a CSS drop down list and I'm having problems getting the drop down list to display beyond the bottom of the iframe. The drop down list cuts off at the bottom of the iframe. Is it possible for a css drop down list to display beyond the borders of an iframe? I've experimented with z-index and have not had any luck yet. Any ideas? I searched the forum before posting but didn't find anything. This is a fairly straight-forward problem, but it's one that I can't find a solution to. The site I'm working on is centered in the window. The body has a 3600x1 pixel background image repeating vertically that is also centered in the window. The layout of the site depends on this background being in the right place. In every browser I've tested so far, the site layout lines up perfectly with the background image, and all is good. But in Firefox 1.5 and Firefox 2.0 (both on Mac), the centered container div sits one pixel to the right of where it should be. Is this a known bug with Firefox? I'm including the code for the body tag and the container div, even though a quick glance will show that it's pretty standard stuff: Code: body { font: 12px/1.5 "Lucida Grande", Helvetica, Arial, sans-serif; color: #363636; background: url(body_bg.gif) top center repeat-y white; text-align: center; } #container { margin: 0 auto; width: 720px; text-align: left; } Any help at all would be terrific. Thanks. Note: I changed the title of this post in the hopes someone will help me. Code: -- HTML <div id="Dashboard"> <table id="Overview"> <tr> <td>Cost <span>$10,710</span></td> <td>Visits <span>51,907</span></td> <td>Cost / Visit <span>$0.21</span></td> <td>Conv. Rate <span>1.3%</span></td> <td>Cost / Conv. <span>16.11</span></td> <td>Conversions <span>655</span></td> <td class="Detail">>></td> </tr> </table> </div> -- CSS /* Dashboard */ #Dashboard { border: 1px solid #b5bfbf; padding: 2px; } /* Overview Table */ #Overview { width: 100%; border-collapse: collapse; height: 50px; background-image: url(../images/dashboard/overviewtable_bg.png); background-repeat: repeat-x; } #Overview td { padding-top: 8px; padding-left: 5px; border: 1px solid #b5bfbf; margin: 0; } #Overview td.Detail { width: 45px; } #Overview span { font-size: 20px; font-weight: bold; display: block; margin-top: 2px; } so there is a DIV with a 2px padding on the inside. But when I check it in firefox, it isn't a 2px space between the outside DIV border and the border of the table. it is more like 1px space on top and left, 2px on bottom and right. I could put another div inside with a border to achieve that 2px spacing, but that just seems extraneous. I am not sure what the issue is? edit: screenshot: http://ricebox.whiteazn.com/tabpadding.png Can any of you tell me why with the a:link/visited set with border:none (as in the example at the bottom of the e-mail), I get a box around an image inside a link: <a href="communication.php"><img src="resources/president.jpg"></a> Working on a MAC, I noticed that the border only appears in Firefox but not in Safari, Opera and OmniWeb. Can anyone tell me why this border appears around the image, why only in FF, and of course, how one can make it dissappear using the stylesheet? STYLESHEET: a {text-decoration: none;} a:link { color: #000000; border: none;} a:visited { color: #000000; border: none;} a:hover { color: #bbbb00; border: none;} a:active { color: #000000; border: none;} .image{border-width:0px; border: none;} What is the method to have a div expand to wrap all the elemetns inside it ? somethings work in IE, some work in Firefox and some work in Safari. I then apply the size to each page separately, but now I have also found out that browsers interpret px differently it seems. my page is www.mmimageart.com, you can go and see in the galleries how if you are using safari, the container div is not wrapping the elements inside. So any help would be appreciatted. Thanks. I made this administration system in php.. its a site php site with a table with a menu, under it is a iframe.. the code for the iframe = Code: <iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="auto" width="524" height="100%" src="news.php"></iframe> then the news.php seems to fail when i scroll in firefox, since the bg in the iframe changes from #F4F4F4 to #FFFFFF in the new space thats uncovered when i scroll.. the bgcolor and bgimage is defined by css, heres the code: Code: .bodyiframe { background-color: #F4F4F4; background-image: url(../images/bgiframe.gif); background-repeat: repeat-x; background-position: top; background-attachment: fixed; } It works fine in explorer 7, but firefox 0.8 cant handle it!.. plz help Centering DIVs inside other DIVs in Firefox? Can it be done in a straight forward way? Setting the inner DIVs float to none seemed to work for IE but not FF. Greetings everyone! I've been working on the following page for a couple of days now, and it looks fine in Safari and Firefox, but all my CSS fail in IE. I don't know what the problem is. Feel free to view the page at the following url http://www.netunification.com/demo/ I spoke with a friend and he speculates IE is having problems with the float command. I'm not so sure of this because I used the same CSS techniques while building the following site (http://www.the904.com/demo/). The904 page renders perfectly in IE and I can't figure out what the difference is between the pages. I thought I used the same concept with both pages. I've been trouble shooting the problem for a couple of days now, but I haven't had any luck. Can please someone take a look at my net u page (http://www.netunification.com/demo/) and suggest a solution Thanks in advance for any/all assistance. Your time and effort is greatly appreciated! Walt Hi guys, pretty new to CSS layout, and recently created a site for my girlfriend. I used 960 grid system to handle my layout css, and it renders perfectly in safari/FF/IE7+... after I installed IE Tester, i realized that IE6 wasnt rendering properly. The menu and z-index stuff arent appearing correctly. If anyone can have a quick look and let me know where my code is causing issues it would be a great help. I'm not allowed to post the URL, as im a new user, but I guess I can send through PM if you want to have a look? Thanks a bunch. Hello, I am using ASP.NET to create a web application. I HAVE to use a master page which means that I do not have complete control over the rendering. The trick is, the master page defines a menu at the top of the page. I need to create a table that dynamically fills the contents of the REMAINDER of the screen. If there is any overflow, I want to scroll the contents. Does anyone know how I can have the table fill the REMAINDER of the screen? I can nest DIVs and such once I have that outer table. Thank you! Crystal Surprise, surprise. I'm using a very simple example of a tabbed interface. Each tab is its own div with a border and a bgcolor. As you will see, IE is displaying the tabs such that they hang 1px over their background container while FF displays as expected. I'm thinking it has something to do with the float but can't seem to figure it out. Any ideas? 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=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> .hdr { background-color: #ccc; } .tab { padding: 0px 5px; background-color: #666; border: 1px solid #000; border-bottom: none; color: #fff; float: left; } .tab.active { background-color: #fff; color: #000; margin: 0px 3px 0px 3px; } </style> </head> <body> <div class="hdr"> <div class="tab active">tab 1</div> <div class="tab">tab 2</div> <br style="clear: both" /> </div> </body> </html> |