CSS - Iframe Background-color Just Wont Work!
Hi all,
I am trying to do something that I think is trivial, but just cannot seem to get this to work in IE! I am trying to draw an IFRAME that contains a gray background that contains a document that has a white background. The result is supposed to make the scrolling document in the IFRAME look like a white piece of paper with a gray border of 8 pixels. This works perfectly in Safari and Firefox, but no matter what I try, I cannot figure out how to get this to work in IE (IE8 specifically). Here is the code: PHP Code: <iframe name='monkey' src='poopy.html' scrolling='auto' frameborder='0' style='background-color:gray;width:500px;height:150px;'></iframe> And the document in the IFRAME is trivial PHP Code: <div style='padding:8px;border:1px solid black;background-color:white;'> This is a bunch of txt THis is a bunch of txt ... (repeat this text a bunch so you have a scrollbar) </div> As far as I can tell, IE implements the background-color attribute for IFRAMES, but it seems to ignore the color - either that or its whacked-out box model requires some kinda bizarre workaround that I cannot find. Thanks in advance for the help. -- Jon Similar TutorialsI 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 Hello, Can someone please tell me what I am doing wrong here. I am trying to alter the background of an input using css. It seems to work in IE but not in fierfox. Below is the sample code. Thanks. Code: <head> <style type="text/css"> .container{ width: 610px; height: 300px; border:solid 3px #59813a; } #format1 input{ background-color: purple; width:75px; } </style> </head> <body> <div class="container"> <form id="form" name="form" method="post" action="index.html"> <table> <tr> <td >Last Name</td> <td ><input type="text" name="name" value="enter name" class="size1" /></td> <td>name</td> <td><div id="format1"><input type="text" name="name" id="name" /></div></td> </tr> </table> </form> </div> <!-- container --> The site I'm working on is at http://www.konkito.com I'm trying to fill the background of the "View Cart" link. For some reason, the background color just doesn't fill up the height of the navigation bar in IE6. Please have a look and point out what I'm doing wrong. Regards. http://www.students.niu.edu/~z162609/asme.html That is my website. As you can see on the left the link box changes with the actual text in the main box. The text goes down as the text on the main content box gets bigger. I am very new to CSS and really do not know anything. I am fairly sure this is a one line fix. However, I really need this and would appreciate any help. Code: html,body{margin:0;padding:0} body{font: 76% arial,sans-serif;text-align:center} p{margin:0 10px 10px} a{padding:5px; text-decoration:none; color:#000000;} div#header{background-color:#F3F2ED;} div#header h1{height:80px;line-height:80px;margin:0;padding-left:10px;} div#container{text-align:left} div#content p{line-height:1.4} div#navigation{background:#F6F0E0;} div#navigation ul{margin:15px 0; padding:0; list-style-type:none;} div#navigation li{margin-bottom:5px;} div#extra{background:#CCC8B3;} div#footer{background:#BFBD93;} div#footer p{margin:0;padding:5px 10px} div#container{width:700px;margin:0 auto} div#wrapper{float:left;width:100%} div#content{margin: 0 150px} div#navigation{float:left;width:150px;margin-left:-150px} div#extra{float:left;width:150px;margin-left:-700px} div#footer{clear:left;width:100%} I have the following coding <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head> <title>CSS Sample Page</title></head> <body> <table style="width: 765px; height: 426px;"> </table><div style="text-align: center;"><!-- First Row contains banner and tagline--></div><table style="width: 765px; height: 426px;"> <tbody> <tr> <td style="text-align: center;" width="50%"><font size="7">Web News</font></td> <!-- spacer cell --> <td> </td> <td style="font-weight: bold; text-align: left;">"The latest in up-to-the-minute Web news,discussion, techniques, and <br>trends"</td> </tr> <!-- Second Row contains headline--> <tr> <td colspan="3"> <h1 align="center"><br></h1><h1 align="center">Web Developers Embrace CSS</h1> </td> </tr> <!-- Third Row contains sub-head --> <tr style="font-family: Helvetica,Arial,sans-serif;"> <td colspan="3"><h2 style="text-align: center;">Simple syntax, powerful design tool</h2> </td> </tr> <!-- Fourth row contains article columns --> <tr valign="top"> <td> <p class="copy"><span style="font-variant: small-caps;"> Cascading Style Sheets (CSS)</span> is a style language for the web. It uses common printing and display terminology to allow HTML and XML authors control over the way web pages look.</p> <p>Although designed in 1996, CSS is just now becoming a useable style language because of a lack of support from the major browsers. IE 5.5 for the Macintosh, released in 1999, is the first browser to completely support the CSS1 specification. Support varies across browsers, but both Netscape 6 and IE 5 for the Windows platforms offer more complete (but still not perfect) CSS support.</p> </td> <!-- Spacer cell --><td> </td> <td> <p> Style sheets accomplish the separation of content and style that is integral to the open nature of data on the web. Currently, web page code mixes both document structure information and browser-based display properties, limiting the cross-platform compatibility of the content.</p> <p>With style sheets, the display properties are separate from the content. This accommodates the diverse variety of devices that are becoming available to browse the web. Whether you come to a web site with a Palm Pilot, PCS phone, or Windows CE device, the server can supply a style sheet that matches your display device. CSS2 supports a variety of media devices, including print, that allows content providers to single-source their data.</p> </td> </tr> </tbody> </table> </body></html> all works so far but the problem I am having is adding specific div tags to the H2 elements. DIV class="subhead"> Simple syntax,powerful @Code in Nl 2nd:design tool</DIV> if i try to add this style rule i get the above text show up in the browser and it wont align centrally. also the cascading style sheets wont show up as small caps. can anyone help me Im sorry to ask here but know of nowhere else to ask, can someone please advice me or forward me to somewhere that can help please? thanks I am regreting taking this course so bad...Thanks alot for your help in my last problem, Im onto assignment 2 now and dont have the slightest clue what to do. The instructions are so unclear, and nowhere anywhere on the internet does it give a straight forward example of how to do a CSS. I am starting with a blank page, using text pad link to a strict html. I dont know where to start and what to type. I am trying all the codes such as <h1> to put in my title and it wont work! I got it to change color with the body color property but thats as much as I can do. Can anyone give me some pointers on how to put heading and writing in my page, why wont it work? Is there a difference between this and when I put my markup in WYSIWYG? All I need to start is to put in my title Christinas cat page... What does a stndard layout look like that will be easy for me to understand? tyvm Hello everybody! Im am now designing a webpage with a pull-upmenu. The menu can be seen he http://www.fidelin.se/ucon/index.php The problem in IE7 is that the dropup-items will disappear when you move the mouse over them. Any suggestions on how to solve this? See the code in the post below. I have not constructed the menu myself, as you might see. Thanks in advance Johan I have a layout made up of divs, and held together by another div. That holder div is supposed to have a background image, but it wont show on every browser that I've tried, except IE7. Here's the id: #holder { background-image: url(/files/images/CSS/header.png); width: 750px; margin-left:auto; margin-right:auto; margin-bottom: 10px; margin-top: 10px; } Backgrounds show on other divs, so why not this one? edit: the sites @ www.tomaustin.dsl.pipex.com/webdev Ive been doing some googling and cant find out how it works how do i apply attributes like a:link, a: hover to an image I had some like Code: image a:hover, a:link, a:active, a:visited { border: etc.. } this does not work..it comes up with the horrid blue and purple backgrounds how do i do it? tom: ) hi, i have a small website i need to make for a school project. Ever since i added the CSS MENU the sidebar just appears half in the middle of the site and no matter what i do, i cannot get it to the right edge. I have tried margin-right but it does nothing, even if i put it at 5. Its 5 closer away from some strange margin almost in the center of the screen HTML::::::::::::::::::::::::::::::::::::::::::::::::::: </head> <body class="about"> <div id="page-container"> <! header---------------------------------------------------------------> <div id="header"> <h1><img src="images/headings/heading.gif" width="700" height="76" alt="Enlighten Designs" border="0" /></h1> <ul id="navigation"> <li><a href="#"><span>Home</span></a></li> <li><a href="#"><span>Services</span></a></li> <li><a href="#"><span>Take a tour</span></a></li> <li><a href="#"><span>About us</span></a></li> <li><a href="#"><span>Contact us</span></a></li> </ul> <p><h1><br>Thermal IR - What is it? </h1></p> </div> <! SIDEBAR A---------------------------------------------------------------> <div id="sidebar"> <p>Sidebar, work please, Please work!</p> </div> <! CONTENT---------------------------------------------------------------> <div id="content"> <div class="padding"> </div> </div> <! COPY RIGHT---------------------------------------------------------------> <div id="copyright"> </div> </div> </body> </html> CSS::::::::::::::::::::::::::::::::::::::::: MENU START///////////////////////////////// #navigation a { color: #000; background: ##00E5EE url(left-tab.gif) left top no-repeat; text-decoration: none; padding-left: 10px } #navigation a span { background: url(right-tab.gif) right top no-repeat; padding-right: 10px } #navigation a, #navigation a span { display: block; float: left } /* Hide from IE5-Mac \*/ #navigation a, #navigation a span { float: none } /* End hide */ #navigation a:hover { color: #fff; background: #781351 url(left-tab-hover.gif) left top no-repeat; padding-left: 10px } #navigation a:hover span { background: url(right-tab-hover.gif) right top no-repeat; padding-right: 10px } #navigation ul { list-style: none; padding: 0; margin: 0; } #navigation li { float: left; margin: 0 1em; } //////////////////////////////////////////MENU END #page-container { width: 760px; margin: auto; background: #c9c9d9; } body { font-family: Verdana; } html, body { margin: 0; padding: 0; color: black; } body { font-family: Arial, Helvetica, Verdana, Sans-serif; font-size: 12px; color: #666666; background: #ffffff; } .hidden { display: none; } #header { margin: left; height: 250px; background: #c9c9d9; border-top: 1px solid #efefef; } #sidebar { top: 200px; float: right; width: 170px; padding: 5px; line-height: 18px; background: #AAAAAA; border: solid 2px black; } #sidebar .padding { padding: 25px; } #content { margin-right: 240px; line-height: 18px; background: #c9c9d9; } #content .padding { padding: 25px; } #copyright { margin-left: 25px; background: #c9c9d9; } h1 { margin: 0; padding: 0; float: right; margin-top: 57px; padding-right: 31px; } #content h2 { margin: 0; padding: 0; padding-bottom: 15px; } #content p { margin: 0; padding: 0; padding-bottom: 15px; } I am trying to get a Table Style layout using only DIVs and CSS and every combination I could find doesn't seem to work when it involves being dynamic. Statically, it works fine. In the image I attached, "1" is the final result I am trying to get. The Red and Blue boxes at the top and bottom will always have a static height of about 25px, but I want the Green in the center to be dynamic, to take up the rest of the space not occupied by the Red and Blue boxes. In example "2", if I set the green to 100% height, it will just flow outside the parent container. And if I don't set a height, as seen in example 3, it will just be a small bar and the bottom Blue box will just move on up with it. Using a table would be easy since I can easily create that basic structure that would always work, but I'm trying to make something in all DIV and CSS and the past many months, I found no solution! Anyone got any ideas that isn't Javascript based? Thanks! Hey all, So i have two files my html file: Code: <html> <head> <link rel="stylesheet" type="text/css" href="styles.css" /> </head> <body> <a href="#">this is a test</a> </body> </html> And my css file: Code: a:link {color:#000000;text-decoration:none;} a:visited {color:#000000;text-decoration:none;} a:hover {color:#CC0000;text-decoration:underline;} a:active {color:#000000;text-decoration:none;} except that the styles don't work on the links. If i put the styles in <style> tags in the html head it works, but in a seperate file they don't, can someone help me? thanks! - legit Edit, whoops sorry, I had the wrong name for my css file Is there a fix? Hello, Im using a separate style.css file to define everything through the site... ive put in this code: Code: .sideheadline {font-family:Verdana,Sans-serif; font-weight:bold; color:#FFFFFF; background-color: #003366; background-image: url(images/bg.gif); background-repeat:repeat; background-attachment:fixed; font-size:10px; } and connected to this line: Code: print "<tr class='sideheadline'><td>Look at the rest too</td></tr>"; But nomatter what i try the image wont show, i tried several images and theyre loadable from the urlbar... so the image works Now i went to w3schools and tested with the online editor... there this exact code works, but then when i copy it to my site it wont! Im using dreamweaver for a editor... Hello everyone. I have a site that uses a PHP command to pull the PHP modifier from the URL and use that as a class for a header. Those classes each have their own BG image in my external stylesheet. On any browser other than IE win it works fine, headers change as the class changes. On IE win though only the first one (my "about" class) works, the rest default to the standard header. I have re-typed the rest to see if it was just a text problem but nope. Everything validates fine. The page is http://holiday.mrpunkin.com/about.php My classes are as follows: they all modify the "mid" div as you can see: Code: #mid.about {background: transparent url("/img/headers/mid_about.gif");} #mid.activities {background: transparent url("/img/headers/mid_activities.gif");} #mid.food {background: transparent url("/img/headers/mid_food.gif");} #mid.travel {background: transparent url("/img/headers/mid_travel.gif");} #mid.resident {background: transparent url("/img/headers/mid_res_rel.gif");} #mid.health {background: transparent url("/img/headers/mid_health.gif");} #mid.fitness {background: transparent url("/img/headers/mid_fitness.gif");} #mid.maintenance {background: transparent url("/img/headers/mid_bg.gif");} #mid.construction {background: transparent url("/img/headers/mid_construction.gif");} #mid.employment {background: transparent url("/img/headers/mid_employment.gif");} Does anyone know why IE Win won't recognize the different BG images and use those? When I view the source I can tell that its outputting the class name correctly, so thats not the issue. Please get back to me asap. Thanks. Hi there people, I have a question about CSS but before I start off asking this question I'll introduce myself. I'm a new user of this great forum, my name is Dwight and I'm a student on the "Graphical Lyceum Amsterdam" where I follow the education for "Multimedia Designer". Ok so now you know me a little, I'll start off asking my question. Question: I have to change the layout for a html page that askes for information from different asp pages, but that's not my problem . The problem is that I have to make some td's a different color -the background that is- but the problem is that I can't change the html page itself (it is automaticly generated and I don't have permission to change it). So my question is can someone tell me how I can change the color of some (not all!) td's with CSS without making classes? Tnx, Dwight Hi, I have made a page using <div> tags. <div id="page"> <div id="leftmenu"> </div> <div id="mainarea"> </div> </div> My problem is that sometimes, the leftmenu is longer than the main area(1) and sometimes its the opposite- the main area is longer than the leftmenu(2). I want them both to be of the same height. (3) How can I do this? Plz Help! I have pasted the style codes for the 3 tags below. (1) (2) (3) #mainarea { background-color:#FFFFFF; float:left; position:relative; right:0pt; width:630px; } #leftmenu { background-color:#EEEEEE; float:left; left:0pt; position:relative; width:140px; } #page { background-color:#FFFFFF; position:relative; width:770px; } Hey Guys! I'm going absolutely bonkers trying to find out how to change the color of the background of a certain element on my site. I installed Vanilla forums on my site and am trying to customize the css script. If you look at the page, you will see an annoying white in the body. I am trying to make the background of that #F6F6F2. Could you guys possibly put me in the right direction? Thanks! Here is a link to my page: shipswatchdotcom/forum/vanilla/aaa.html Here is the css script: Code: #Body { margin: 0; width: 99.9%; position: relative; background: #F6F6F2; } #Head { background: #B8D4B8; padding:0; margin: 20px 20px 0; text-align: left; position: relative; } div.Popup h1, div.Popup h2, div.Connect h1, div.Connect h2 { background: #F6F6F2; border-bottom: 1px solid #3b5998; } .Banner { padding: 10px; text-align: left; position: relative; background: #F6F6F2; } .Banner ul { background: #B8D4B8; padding: 0; margin: 0; } .Banner ul li { display: inline; padding: 0; margin: 0; } .Banner ul li a { font-weight: bold; padding: 3px 6px; font-size: 11px; color: #336633; display: inline-block; } .Banner ul li a:hover { background: #E5F0E5; } .Banner ul li a.SignOut { font-weight: normal; position: absolute; top: 10px; right: 10px; } .Banner ul li a span { border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; padding: 1px 2px 0 1px; background: #F6F6F2; border-right: 1px solid #F6F6F2; border-bottom: 1px solid #F6F6F2; color: #F6F6F2; font-size: 9px; position: relative; top: -3px; } #Content { float: none; width: auto; margin: 0 280px 0 10px; background: #F6F6F2; } #Panel { float: right; margin-right: 10px; background: #F6F6F2; } #Panel div.SearchBox input.InputBox { width: 200px; margin-right: 4px; background: #F6F6F2; } div.SearchBox { margin-bottom: 6px; } body.Profile div.SearchBox { display: none; } body.Profile #Content { float:none; width: auto; margin: 0 10px 0 280px; background: #F6F6F2; } body.Profile #Panel { margin: 0 0 0 10px; background: #F6F6F2; } form.Activity textarea { width:99%; background: #F6F6F2; } #Foot div { width: auto; background: #F6F6F2; } body.Post #Content { width: auto; margin:0 20px; background: #F6F6F2; } #ConversationForm textarea.MultiComplete, #ConversationForm .TextBox, #MessageForm textarea, div.Comment div.CommentForm, div.Comment div.CommentForm textarea, div.CommentForm textarea, #DiscussionForm input.InputBox, #DiscussionForm textarea { width:99%; background: #F6F6F2; } #ConversationForm form { border: none; } div.Preview div.Message, ul.MessageList div.Message { clear: none; } #DiscussionForm form { background: #F6F6F2; border: 1px solid #ccc; } div.MessageForm, div.Tabs { background: #F6F6F2; border-bottom:1px solid #ccc; } /* Tabs */ div.Tabs { background: #F6F6F2; padding: 0; border-bottom: 1px solid #aaa; } div.Tabs ul { padding: 0 8px; white-space: nowrap; } div.MessageForm { padding: 8px 8px 5px; } div.MessageForm div.Tabs { padding: 0 8px; } div.Tabs li a, div.Tabs li a:link, div.Tabs li a:hover, div.Tabs li a:active, div.Tabs li a:visited { font-size: 11px; margin: 0; border: none; border-radius: 0; -moz-border-radius: 0; -webkit-border-radius: 0; background: #F6F6F2; color: #336633; text-decoration: none; padding: 8px 10px; line-height: 11px; } div.Tabs li a:hover { text-decoration: underline; } a.Active, div.Tabs li.Active a { background: #F6F6F2; color: #336633; margin: 0; border: 1px solid #aaa; border-bottom: none; border-radius: 3px 3px 0 0; -moz-border-radius: 3px 3px 0 0; -webkit-border-radius: 3px 3px 0 0; display: inline-block; font-size: 12px; line-height: 12px; font-weight: bold; text-decoration: none; padding: 6px 10px; position: relative; top: 1px; } div.Tabs li a span { line-height: 1; font-size: 80%; padding: 0 3px; border-radius: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; font-weight: normal; background: #F6F6F2; color: #4A7023; margin: 0 0 0 4px; } div.DiscussionsTabs div.SubTab { font-size: 11px; border-radius: 0; -moz-border-radius: 0; -webkit-border-radius: 0; border-top: 1px solid #aaa; background: #F6F6F2; margin:0; padding:4px 8px; } div.HeadingTabs ul { margin: 8px 0 0; } body.Discussion a.Bookmark { margin: 6px 2px; } div.Preview { border: 1px solid #aaa; background: #F6F6F2; margin:0 0 8px; padding: 8px; } .Foot { background: #F6F6F2; border: none; } div.MorePager a, div.MorePager a:link, div.MorePager a:visited, div.MorePager a:active, div.MorePager a:hover { border-radius: 0; -moz-border-radius: 0; -webkit-border-radius: 0; background: #F6F6F2; border: none; color: #4A7023; line-height: 1; padding: 0; text-decoration: none; } div.MorePager a:hover { color: #4A7023; text-decoration: underline; } body.add #Content { margin: 0 10px; background: #F6F6F2; } /* Panel Boxes */ #Panel div.Box { border-radius: 0; -moz-border-radius: 0; -webkit-border-radius: 0; box-shadow: none; -moz-box-shadow: none; -webkit-box-shadow: none; background: #F6F6F2; padding: 0; } div.Box h4 { color: #4A7023; } ul.PanelActivity, ul.PanelInfo { border-top:1px solid #ccc; } ul.PanelActivity li, ul.PanelInfo li, ul.PanelInfo li.Active { background: #F6F6F2; border-bottom: 1px solid #ccc; } ul.PanelInfo li.Active { background: #F6F6F2; } #Status { border-radius: 2px; -moz-border-radius: 2px; -webkit-border-radius: 2px; background: #eee; color: #000; line-height: 1.6; padding: 3px 6px; margin: 0 0 8px; } body.Profile ul.PanelInfo { border: #F6F6F2; } body.Profile ul.PanelInfo li { margin: 0; padding: 0; } body.Profile ul.PanelInfo li a { font-size: 12px; display: block; padding: 0 6px; background: #F6F6F2; } body.Profile ul.PanelInfo li a:hover { background: #F6F6F2; } /* Sign In Page */ body.Entry #Content { text-align: center; margin: 0 auto !important; } body.Entry #Content div.Box { background: #F6F6F2; border: 0; } div.Methods { border-left: 1px solid #ccc; } /* Messages */ div.DismissMessage { background: #F6F6F2; border: 1px solid #ccc; padding:6px 8px; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; } div.DismissMessage a.Dismiss:hover { color: #000; } div.Warning { background: #d00; border: 1px solid #b00; color: #F6F6F2; text-shadow: 1px 1px 1px #444; } div.Warning a.Dismiss { color: #F6F6F2; } #Content div.Box { color: #000; background: #F6F6F2; border: 1px solid #F6F6F2; } body#dashboard_entrycontroller_signin div.Box { border: none; } /* Autocomplete */ .ac_results { border: 1px solid #d7d8da; color: #000; border-top: 0; background-color: #F6F6F2; } .ac_results li { border-bottom: 1px solid #d7d8da; } .ac_lastitem { border-bottom: 0 !important; } .ac_results strong { background: #F6F6F2; } .ac_over strong { background: #F6F6F2; } .ac_over { background: #3b5998; color: #fff; } i wanted usersto choose their own style sheet by giving them different links like red, green, blue which will take them to different layouts or background color page. the problem was that worked only for that particular page but if they click on any link or menu from that page it will take them back to the default color. is there any way that i can set so that their choice will stay throught their surfing ? any thoughts ? hanks |