CSS - Strange Line In Code
Like I said in a previous post, I'm taking over design of a project that was abandoned. I'm nearly complete, except my site won't show in IE. I found this line of code to be the reasoning, and I cannot for the life of me figure out what this line is attempting to do. I can't parse it. This might be in the wrong forum section, I'm not entirely sure.
Code: <div style="z-index: 2;" class="yui-module yui-overlay yui-tt" id="preview-tooltip-nws"><div class="bd"></div></div><div style="z-index: 2;" class="yui-module yui-overlay yui-tt" id="preview-tooltip-ws"><div class="bd"></div></div><iframe style="position: absolute; visibility: visible; width: 10em; height: 10em; top: -134px; left: -134px; border-width: 0pt;" id="_yuiResizeMonitor" src="data:text/html;charset=utf-8,%3Chtml%3E%3Chead%3E%3Cscript%20type%3D%22text%2Fjavascript%22%3Ewindow.onresize%3Dfunction%28%29% 7Bwindow.parent.YAHOO.widget.Module.textResizeEvent.fire%28%29%3B%7D%3C%2Fscript%3E%3C%2Fhead%3E%3Cb ody%3E%3C%2Fbody%3E%3C%2Fhtml%3E"></iframe> Similar TutorialsAlright, I've got a really strange problem going on. I've recently redesigned my weblog to be more standards-compliant, and I've copied the modifed Fahrner Image Replacement technique that Zeldman is using on his site. You can see on his site that the H1 is shoved off-page with a negative text-indent, and the background is applied to the A tag inside the H1, which allows the header image to still be "clickable." I was able to successfully duplicate this behavior using the following code. Code: XHTML: <div class="header"> <h1><a href="/">Space Ninja Blog</a></h1> <p class="tagline">site tagline here.</p> </div> STYLESHEET: p.tagline { display: none; } h1 { text-indent: -9999px; margin: 0; padding: 0; border: 0; } h1 a:link, h1 a:visited, h1 a:hover { display: block; width: 650px; height: 150px; background: #777 url(/blog/css/images/wa_st_header.jpg) top left no-repeat; margin: 0; padding: 0; border: 0; } Now, that is the same code that Zeldman uses, and it works fine in all the modern browsers I've tested in except one: In Mozilla Firefox on XP, I get a strange purple line extending from the header image offscreen. This is clearly the link outline or underline, since if I click on the header image, the purple turns red, and it's extending towards where the H1 text has been shoved offscreen. My problem is that this doesn't happen on Zeldman's site, and for the life of me, I can't see what the difference is. Hell, we're even using the same doctype, and we're both importing our stylesheets. But I get this weird line, and he doesn't. Note also that the line doesn't show up in any other browser I've tested, even Firefox on my Mac. Any suggestions are welcome! This pertains to the "last nail in the coffin" so to speak in cross-browser compatability with the template for this site. The template is at http://www.spearsphotography.com/test_index.html The effect in question is on paragraph tags in the news item elements under the pagebody id div. (e.g., #pageblock div.story p ). Essentially, in every browser -except- IE Windows, the line spacing is as intended by the design. In IE6Win (haven't tested 5, but assume same) the lines are too-tight. Can anyone see the problem here, or has experienced this before? CSS File is at: http://www.spearsphotography.com/css/style.css Thanks. I have coded my css file to display a border and change the background color of any text I put inside of <p> tags. It seems to work fine until I have to create a new line using <br> then it ignores everything after the <br> and strips the styling. My css is attached below: Quote: p.doubleSpaced { line-height: 200%; text-align: left; background-color: #eeeeee; border: #dddddd 2px solid; padding: 10px 15px; } My page can be viewed he http://dev.asbco.com/products/insti...al-recrational/ Thanks for the help! Greetings, I have a class called "header" and I am trying to give it a touch of extra space between it and the next line. All of my headers are just a few words and thus on one line. I tried placing "line-height: 1.5em" in my "header" class and it shows up correctly in Dreamweaver but not in IE. My thought is, because it is only a single line, that class value does not kick in because there is no second line for that class. Is there a way to conrol this in CSS or am I going to have to resort to using a....gulp.....spacer? Thanks in advance! I've got two lines of text. Want the spacing the two lines to increase, so I set a line-height. When I do this, not only does it increase space between the two lines, it also increases spacing above the first line (and maybe below the second). How can I increase spacing between the two lines only, without increasing above and below? Thanks! Greetings, I am relatively new to CSS and am using background image bullets. Problem is, in the case of a two line link, the bullet aligns in between the two lines and I need it to align to the top line. Below is the CSS, and attached is a screenshot of the link to better illustrate my predicament. Thanks for any help! li { list-style-type: none; background: url(../images/bullet.gif) no-repeat left; padding: 0 0 0 10px; } http://www.wwu.edu/~swing/newswingsite/index.html I'm relatively new at this, but I've been trying my hardest to learn how to do all of this while conforming to web standards. I've got my page looking almost (see below) like I want it to in Firefox, but in IE I get these ugly gaps. I used to get them in the inset box too, but I figured out a way to make them go away. I can't figure out how to make it go away in the header though. So my questions, so that I can actually learn something here, are these: What causes that big gap? How do I get rid of it? Is there a better/cleaner/simpler way to style the inset box so as to avoid the gaps? Also, you can see that there's one pixel missing in the gold border. That's from the blue top border so as to blend the rounded top border gif. Is there an easier way to add the rounded top? When I simply had no top border, things got screwy. Thank's for any help/insight you can give! i have the following CSS Code: #logoOuter{ width:155px; height:90px; background-color:#336699; position:relative; float:left; } #logo{ bottom:0px; position:absolute; } html>body #logo{ margin-bottom:-5px; } #globalNavOuter{ margin-left:155px; background-color:#00CC99; } #globalNavTop{ height:19px; } #globalNavBottom{ height:71px; } and this XHTML Code: <div id="header" > <div id="logoOuter"> <div id="logo"> <img src="images/logo.gif" border="0" /> </div> </div> <div id="globalNavOuter"> <div id="globalNavTop">globla Nav Top</div> <div id="globalNavBottom">global nav bottom</div> </div> </div> The problem is there was a 5px gap at the bottom of the image in moz/FF and in IE when i took the whitespace out (the CR's) of the html the space went away in IE bot not MOZ/FF so i added a -5px margin to the bottom of that div and that did the trick in FF but it over did it in IE thus the sub selector > hack. [EDIT] I just took the image away and that fixes it. So it looks like it's the image causing it. doing a - vertical alignment seems to fix it but I still dont understand why... Gary perhaps you can explain this to me...i just dont get it Some days tables just seem so much easier........ I have learned a lesson, To look in F.F as well as I.E6 to make sure all layout is showing as it should be, it is to a point. I had three errors when I looked in validator. Learned also yesterday that there is also CSS validator heaven forbid. I had this random image script that shows all images in posts. The link colors are what were different in F.F. Right color iin I.E. I have took that out now because when it showed images from the posts and the sidebar randomly the image over shot the sidebar when it shows both same images as the script found the posted images. I may have the answer to that by another random image to pull from a directory instead. On the F.F last year I had a site that had 100 errors lol so I wanted to check everything as I go this time around. If anyone has Opera please could they check out my Wordpress please? My link is in my profile as I saw yesterday there are rules about links with good reason. S how come the border was different color in F.F thats my question? Thanks! now, i'm posting this after i've scoured the forum here and i have yet to find a posted resolution. The problem i'm having is pushing the footer to the bottom of the page, as opposed to the bottom of the window. The #footer is as follows: Code: #footer { position: absolute; bottom: 0px; (border/font/background/padding properties) width: 310px; margin-top: 8px; clear: both; } you can view the full style sheet here. if the page has enough information to push past the window height, teh footer remains at the bottom of the window, and is placed on top of the stacking order. The strangest part is that if you scroll, the footer scrolls with the page. To see what i'm talking about, go to the page and try resizing the window. Hi, i have just noticed a very strange cross browser issue. On several of my sites, i have applied simple css styling to my select boxes / drop down menus... some of this styling has been simply changing the color of the text in the drop down menu. The styling is fine in IE7+, FF (PC), Opera (PC), Chrome (PC), FF (Mac), Safari (Mac), Opera (Mac) BUT NOT ON Chrome (Mac) I can't understand how you can't apply simple css such as text color to Chrome on a Mac Has anyone else noticed this or found a solution to this... thanks in advance for your help Hey, Check out the attachment. (I had to spray paint out the important parts that would highly violate the NDA) Here is some of the CSS: Code: .currentprojects{ margin-top:10px; margin-left:8px; width:245px; } .currentprojects .proj_heading{ font-weight:bold; padding-left:8px; color:#005e9d; font-family:Verdana, Arial, Helvetica, sans-serif; background-image:url(../images/leftside_midsect_mid.gif); font-size:18px; padding-bottom:5px; } .currentprojects .proj_content{ padding-left:8px; background-image:url(../images/leftside_midsect_mid.gif); } .rssfeeds{ margin-top:10px; background-image:url(../images/leftside_midsect_mid.gif); margin-left:8px; width:245px; } .rssfeeds .rss_heading{ font-weight:bold; padding-left:8px; color:#005e9d; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:18px; padding-bottom:5px; } .rssfeeds .rss_content{ padding-left:8px; color:#000000; } img{ margin-bottom:0; vertical-align:text-bottom; } Now, the projects one is the top. And the rss is the bottom. Here is the HTML code Code: <div class="currentprojects"> <img src="images/leftside_midsect_top.gif" /> <div class="proj_heading"> Heading </div> <img src="images/leftside_midsect_midsplit.gif" /> <div class="proj_content"> stuff </div> <img src="images/leftside_midsect_bot.gif" /> </div> <div class="rssfeeds"> <img src="images/leftside_midsect_top.gif" /> <div class="rss_heading"> Heading </div> <div class="rss_content"> stuff </div> <img src="images/leftside_midsect_bot.gif" /> </div> Does anyone have any idea why this is doing that in IE? FF it works fine (like that's really a surprise anymore). I have a strange css bug in IE 6 and 7 while making a simple two column structure. In firefox both the left and the right columns are top aligned properly but in IE the right column has around 15px of space on top of it. I can't seem to figure out why this space is coming. This seems like the IE peekaboo bug but can't be fixed using the line-height hack. Instead giving the IE proprietary ZOOM property to the UL we can fix this bug in IE. But I want to know is there any other method to fix this issue which uses valid css. Doctype for the HTML is xHTML transitional Here is the css code. #gdsrView{width:456px;} #gdsrView .srchGrpMod{} #gdsrView .grpResHdr{} #gdsrView .grpPagination{} #gdsrView .srCnt{clear:both;float:none;} #gdsrView .srCnt ul{list-style-type:none;margin:0;padding:0;} #gdsrView .srCnt ul#lstView li{clear:both;float:none;border-bottom:1px solid green;padding-bottom:5px;} #gdsrView .srCnt ul#lstView .grpPic{width:75px;height:75px;overflow:hidden;float:left;} #gdsrView .srCnt ul#lstView .grpInfo{background:#cacaca;margin-left:83px;} #gdsrView .srCnt ul#lstView dl.grpMLnk{font-size:1.1em;} #gdsrView .srCnt ul#lstView .grpInfo dl.grpMLnk dt{display:inline;} #gdsrView .srCnt ul#lstView .grpInfo dl.grpMLnk dt a.actLnk{font-size:0.8em;} #gdsrView .srCnt ul#lstView .grpInfo .grpDes{font-size:1em;} #gdsrView .srCnt ul#lstView .grpInfo .tStamp{font-size:0.9em;} #gdsrView .clearFl{margin-top:1px;} HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "(URL address blocked: See forum rules)"> <head> <title>IE bug</title> </head> <body> <div id="gdsrView"> <div class="srchGrpMod"></div> <div class="grpResHdr"></div> <div class="grpPagination"></div> <!-- Begin: group results list view --> <div class="srCnt"> <ul id="lstView"> <li style="background:red;zoom:100%;"> <div class="grpPic"> <img src="../images/pic.jpg" alt="Group Image" width="75" height="75" /> </div> <div class="grpInfo"> <dl class="grpMLnk"> <dt><a href="#">Lorem Ipsum dolor amet consectectuer...</a></dt> <dt><a class="actLnk" href="#">Request Invitation</a></dt> </dl> <p class="grpDes">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.Donec mattis urna eget magna. Nam cursus ipsum sit amet.lorem. Vestibulum ante ipsum primis in faucibus orci luc..</p> <p class="tStamp">Updated 55 Minutes ago</p> </div> <div class="clearFl"></div> </li> </ul> </div> <!-- End: group results list view --> </div> </body> On my test website that i make designs on I am having a very strange problem with the styles of my links. i am trying to change the style of the title for the posts to have a blue color and the turn light blue on hover. however i have this problem where I change the style on the title, and there are also random links in the sidebar that follow that style as well. i dont know if it is bug or what, but is begining to give me a headache. Right now i colored the links pink so that are easy to see. This happens in both opera and firefox for me. the url is nverted.net Hi all, Please see http://www.jaysonsgroup.com/ztest/ntc/zcontact.html It's full of tests, but here's the problem.. The "Do you need more than one NTC Card" text at the bottom, needs to be followed by the text "(To share the Modem with friends)?*" IMMEDIATELY below it... Unfortunately, in IE, there is a spacing problem - see the link below for 2 screenshots for what I mean: http://www.jaysonsgroup.com/ztest/ntc/zie.gif The code is simple: Code: <div class="fieldname_long">Do you need more than one NTC Card</div> <div class="fieldvalue">(input field will come here)</div> <div class='spacer_1px'> </div> <div class='fieldname_text'>(To share the Modem with friends)?*</div> The CSS: Code: .spacer_1px { clear: both; height: 1px; overflow:hidden; background: blue; } .fieldvalue { float: left; background: #ccc; display: inline; margin: 0; } .fieldname_long { float: left; width: 120px; line-height: 13px; padding-right: 15px; color: #B30000; font-weight: bold; background: #eee; display: inline; margin: 0; } .fieldname_text { color: #B30000; font-weight: bold; } Note - I justr added "display:inline" and "margin:0" above to 'fieldname_long' and 'fieldvalue' but it doesn't fix anything in IE In the test link above, you can see that the blue line is the spacer_1px and that line should be touching the fieldname_long (light grey box). This happens in Firefox. But in IE, there's a gap which I need to remove. Sorry this is a really small thing but I just can't figure it out! Any ideas? Many thanks! I have a DIV on my page with the style 'bottom' applied to it. It is coloured red so you can see it. I would like it at the bottom outside of all the other divs/containers. The DIV with the red background should be at the very bottom of the page, under the large DIV. This is the HTML placing it on the page: HTML Code: Code: <!-- InstanceEndEditable --></div> <div class="bottom">bottom</div> </body> You can see it is the last DIV on the page. Yes I am using Dreamweaver templates. Here is the CSS for the bottom class: Code: Code: .bottom { margin: 0px; padding: 0px; background-color: red; border: 0px solid #999999; height: 20px; width: 100%; } It appres in different places on different pages. 'bottom' DIV at the top of the page: http://www.jfwebdesign.co.uk/photog/ 'bottom' DIV almost at the bottom of the page: http://www.jfwebdesign.co.uk/photog/about.php 'bottom' DIV at the top of the page: http://www.jfwebdesign.co.uk/photog/work.php 'bottom' DIV at the top of the page: http://www.jfwebdesign.co.uk/photog/contact.php Here is a link to the CSS file: http://www.jfwebdesign.co.uk/photog/styles.css Can anyone explain why? Many thanks. The situation is very simple. Just test the following code in IE7 or Mozilla, and then in IE6. You will note that in IE6 there's a gap below the two divs. HOw can I fix this ? Code: <style> .fontBold,.fontBoldLink{ font-family:tahoma; font-size:14px; font-weight:bold; color:#333333;} .fontTitle { font-size:16px;} .fontBoldLink { text-decoration:underline; cursor:pointer;} </style> <div style="overflow:auto; margin-top:20px; margin-bottom:0px; border:0px #000000 solid"> <div class="fontBold" style="width:150px; float:left; text-align:center; padding-top:3px; border:1px #999999 dashed ; border-bottom:0px; background-color:#EFEFEF; height:20px;">Left Padding</div> <div class="fontBoldLink" style="float:right;padding-left:20px; background-repeat:no-repeat">Right Padding</div> </div> <div style=" background-color:#EFEFEF; clear:both; border:1px #999999 dashed; padding:10px; height:60px; margin-bottom:10px; margin-top:0px "></div> HI all, I've a problem. When my page is on hard drive it works fine. When I upload it to server, some characters screw up, such as three dots in a row.. and other punctuation. Take a look at the popup: http://www.mustsh.com.cn/testingdim.html Also.. any suggestions? My design is fairly whack.. Hi. I have noticed a strange behavior with my CSS and I cannot figure out a way to fix it. I have some css to override the body tag style. It sets the font family and size. I need to do this. However, when I use the font-size in the body, it adds extra pixels to a set of span tags that I use. (see attached picture). Here is my code. Does anyone know how I can include the font-size in the body, but not have that extra space in my div tags? Note: the sample image contains images on the edge of the tabs, but their presence has no effect on the issue. Also, this is for IE 6 on Windows. Thanks, Dave Code: <html> <head> <style> body { font-family: Tahoma,Verdana,Arial,sans-serif; font-size:11px; /* with this line, extra space appears */ } .tab_off { height:17px; overflow:hidden; cursor:hand; } .tab_off_text { background:#ACA899; height:15px; font-size:10px; border-top:1px solid #aaaaaa; border-bottom:1px solid #ECECEC; padding-left:4px; padding-right:4px; vertical-align:middle; } .tabbed_panel { background:#ECE9D8; border-left:1px solid #666666; border-bottom:1px solid #666666; border-right:1px solid #666666; width:400px; height:400px; } </style> </head> <body> <div id="pnlTabs"> <span class="tab_off"> <span class="tab_off_text">Tab One</span> </span> </div> <div id="pnlContent" class="tabbed_panel"></div> </body> </html> I have been tearing my hair out trying to figure out what is causing this artifact. I am assuming that it's a rendering issue with IE6, but wanted to ask here to see if anyone can think of what is causing it. Here is a screenshot: http://www.chimericdream.com/downloads/indexv_v35_ie6_bug.jpg And here is the HTML/CSS markup for that part of the page: HTML Code: <div id="findHelp"> <h3 id="findHelpHeader">Find the help you need!</h3> <form id="findHelpForm" action="" method="post"> <fieldset> <label for="subject">Subject</label><br /> <select name="subject" id="subject"> <option value="">Search all subjects</option> </select> </fieldset> <fieldset> <label for="grade">Grade</label><br /> <select name="grade" id="grade"> <option value="">Search all grades</option> </select> </fieldset> <fieldset> <label for="type">Type of help</label><br /> <select name="type" id="type"> <option value="">Search all types</option> </select> </fieldset> <fieldset id="last"> <br /><input type="submit" value="" id="findSubmit" /> </fieldset> </form> <!-- #findHelpForm --> <div id="featuredTeachers"> <h3>Featured Teachers</h3> <div class="teacherBox"> <img src="images/photo_Lisa.jpg" alt="Lisa Yang" /><br /> Lisa Yang <img src="images/browseWidget_btnPromo.png" alt="Button" /><br /> <strong>Advanced Chemistry Prep</strong><br /> <small>9th grade - 12th grade</small><br /> <img src="images/rating_starActive.gif" alt="Gold Star" /><img src="images/rating_starActive.gif" alt="Gold Star" /><img src="images/rating_starActive.gif" alt="Gold Star" /><img src="images/rating_starActive.gif" alt="Gold Star" /><img src="images/rating_starInactive.gif" alt="Blank Star" /> </div> <!-- .teacherBox --> <div class="teacherBox"> <img src="images/photo_Drew.jpg" alt="Drew Hamlin" /><br /> Drew Hamlin <img src="images/browseWidget_btnPromo.png" alt="Button" /><br /> <strong>Proper CSS/HTML Coding</strong><br /> <small>College</small><br /> <img src="images/rating_starActive.gif" alt="Gold Star" /><img src="images/rating_starInactive.gif" alt="Blank Star" /><img src="images/rating_starInactive.gif" alt="Blank Star" /><img src="images/rating_starInactive.gif" alt="Blank Star" /><img src="images/rating_starInactive.gif" alt="Blank Star" /> </div> <!-- .teacherBox --> <div class="teacherBox"> <img src="images/photo_Joey.jpg" alt="Joey Flynn" /><br /> Joey Flynn <img src="images/browseWidget_btnPromo.png" alt="Button" /><br /> <strong>Natural Sciences Overview</strong><br /> <small>6th grade - 8th grade</small><br /> <img src="images/rating_starActive.gif" alt="Gold Star" /><img src="images/rating_starActive.gif" alt="Gold Star" /><img src="images/rating_starInactive.gif" alt="Blank Star" /><img src="images/rating_starInactive.gif" alt="Blank Star" /><img src="images/rating_starInactive.gif" alt="Blank Star" /> </div> <!-- .teacherBox --> <p><a href="#">See more teachers</a></p> </div> <!-- #featuredTeachers --> <div id="adobePlayer"> <h4>We've got something better for you.</h4> <p>For an interactive search experience, please download Adobe Flash Player.</p> <a href="#"><img src="images/browseWidget_btnGetFlash.gif" alt="Get Adobe Flash Player" /></a> </div> <!-- #adobePlayer --> </div> <!-- #findHelp --> CSS Code: #findHelp {width: 743px; height: 313px; background: #fff url('images/browseWidget_background.png') top left no-repeat; position: relative; margin-bottom: 1em;} #findHelp #findHelpHeader {position: absolute; top: 15px; left: 25px; font-size: 1.3em;} #findHelpForm {position: absolute; top: 45px; left: 25px; width: 718px;} #findHelpForm fieldset {float: left; width: 27%; margin-right: 10px;} #findHelpForm fieldset label {font-weight: bold;} #findHelpForm fieldset select {width: 100%; border-width: 1px; border-style: inset;} #findHelpForm fieldset#last {width: 10%;} #findSubmit {width: 88px; height: 23px; background: #fff url('images/browseWidget_btnSearch.gif') top left no-repeat;} #featuredTeachers {position: absolute; bottom: 35px; left: 20px;} #featuredTeachers p {position: absolute; bottom: -20px; right: 15px; font-size: 90%;} .teacherBox {width: 175px; float: left; text-align: center;} #findHelp #adobePlayer {width: 150px; position: absolute; bottom: 30px; right: 20px;} #findHelp #adobePlayer h4, #findHelp #adobePlayer p {color: #777; margin-bottom: 1em;} #findHelp #adobePlayer p {font-size: 85%;} Any help would be greatly appreciated. |