CSS - Text Overflow
When i resize my band website www.smilingindustries.be , the text flows over my menu :s
try for yourself when resizing your browser window . www.smilingindustries.be/Style.css is the style page I've been trying to figure that one out all afternoon Similar TutorialsI have a problem with a page on my website. Some of the text on the bottom of the page floats over the text at the top of the page. The only browser where it looks good is IE6. So i dragged my page through de XHTML checker of W3C and debugged until it had no errors. Next I did the same with my css file. I used the browsercam to see if it made any difference. Unfortunately it didn't. It still has the error and i don't know how to fix it or where to start. I hope someone can help me out here. Or maybe someone can tell me where i can find some info about these problems. Browsing this forum, i see that i am not the only one who is having problems with different browsers. You can see here how the webpage looks in IE6 on XP (This is how it should look in other browsers). You can see here how the webpage looks in Safari You can see here how the webpage looks in IE5 on Win 98. This is my css: Quote: body { background-color: White; color: Black; } a { text-decoration: none; font-family: Arial, Helvetica, sans-serif; color: Black; } a:link { color: #F0027F; } a:visited { color: #F0027F; } a:active { color: #F0027F; } a:hover { color: Black; } h1, h2, h3 { margin: 0px; padding: 0px; font-weight: normal; } #container { position:absolute; left:50%; width: 600px; margin-left: -300px; border: 1px solid Black; background-color: White; } } #banner { background-color: White; border-bottom: 1px solid White; color: #FFFFFF; font-family: Arial, Helvetica, sans-serif; height: 42px; padding: 0px; text-align: left; width: 310px; padding-left: 0px; } #banner-commentspop { background-color: White; border-bottom: 1px solid Black; color: #fff; font-family: Arial, Helvetica, sans-serif; font-size: x-large; font-weight: bold; padding: 0px 10px; text-align: left; width: 310px; } #banner a { color: #FFFFFF; text-decoration: none; } #banner1 { font-size: xx-large; font-weight: bold; width: 600px; padding-left: 0px; border-bottom-width: 1px; border-bottom: 1px dashed #F0027F; color: #F0027F; height: 0px; } #content { background-color: #FFFFFF; color: Black; float: left; font-family: Arial, Helvetica, sans-serif; font-size: 8pt; overflow: hidden; padding: 5px 5px 5px 0px; width: 350px; border-right-width: 10px; border-style: none dashed none none; border-right: 1px dashed #F0027F; margin-right: 20px; padding-bottom: 20px; } #menu { font-family: Arial, Helvetica, sans-serif; margin-bottom :15px; color: Black; font-family: 'Trebuchet MS', Verdana, sans-serif; font-size: 8pt; overflow: hidden; padding: 0px 0px 0px 10px; background-color: White; border-style: none none none dashed; } .blog { background-color: White; padding: 10px 0px; width: 310px; margin-top: 45px; } .blog p { text-decoration: none; font-family: Arial, Helvetica, sans-serif; } .blog blockquote { } .blog li { } .blog h2 { color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 8pt; border-bottom: #000000; text-align: left; font-weight: bold; margin-bottom: 10px; padding: 0px 70px 30px; } .blog h3 { color: #F0027F; font-family: Arial, Helvetica, sans-serif; font-size: 17pt; text-align: left; font-weight: bold; margin-bottom: 0px; } .blog .blogphoto { font-family: Arial, Helvetica, sans-serif; font-size: 8pt; width: 30px; float: left; text-align: left; padding-top: 40px; } .blog .blogbody { font-family: Arial, Helvetica, sans-serif; font-size: 8pt; width: 250px; margin-left: 70px; float: right; margin-top: -155px; } .blog .posted { color: #2CB0CF; display: block; font-family: Arial, Helvetica, sans-serif; font-size: 9pt; line-height: normal; text-align: left; border-bottom: 1px dotted #F0027F; width: 245px; margin-bottom: 40px; font-style: italic; border-bottom-width: 1px; padding-bottom: 10px; } #links { background-color: White; overflow: hidden; width: 190px; margin-left: 0px; border-left: 1px dashed EF1385; padding-left: 30px; border-left-width: 1px; border: 1px dashed #F0027F; border-bottom: 0px; border-right: 0px; border-top-width: 0px; padding-bottom: 700px; padding-top: 30px; } .side, .syndicate, .powered { font-family: Arial, Helvetica, sans-serif; font-size: 8pt; padding: 3px 15px 10px 0px; text-align: left; } .side a { text-decoration: none; color: #F0027F; font-family: Arial, Helvetica, sans-serif; font-size: 8pt; font-weight: bold; } .side a:link { color: #F0027F; font-weight: bold; } .side a:visited { color: #F0027F; } .side a:active { } .side a:hover { color: Black; } .calendar { line-height: 140%; color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 8pt; padding: 2px; text-align: center; margin-bottom: 30px; } .calendar table { padding: 2px; border-collapse: collapse; border: 0px; width: 100%; font-family: Arial, Helvetica, sans-serif; font: 8pt; font-weight: bold; } .calendar caption { color: #666666; font-family: Arial, Helvetica, sans-serif; font-size: 8pt; border-bottom: 1px solid #999999; text-align: left; font-weight: bold; text-transform: uppercase; padding: 3px; letter-spacing: .3em; } .calendar th { text-align: center; font-weight: normal; } .calendar td { text-align: center; } .sidetitle { border-bottom: 1px solid Black; color: #F0027F; font-family: Arial, Helvetica, sans-serif; font-size: 8pt; font-weight: bold; letter-spacing: normal; text-transform: uppercase; } .side ul { padding-left: 0px; margin: 0px; margin-bottom: 30px; } .side li { color: #000000; text-align: left; margin-top: 0px; list-style-type: none; } .side img { border: 1px solid Black; float: left; } .photo { text-align: left; float: left; } .link-note { font-family: Arial, Helvetica, sans-serif; font-size: 8pt; text-align: left; padding: 2px; margin-bottom: 15px; } .comments-head { border-bottom: 1px dashed #F0027F; color: #F0027F; font-family: Arial, Helvetica, sans-serif; font-size: 17pt; font-weight: bold; margin-bottom: 10px; text-align: left; margin-left: 70px; } .comments-body { color: Black; font-family: Arial, Helvetica, sans-serif; font-size: 8pt; font-weight: normal; text-align: left; margin-bottom: 10px; margin-left: 70px; } .comments-body textarea { width: 75%; } .comments-post { border-top: 1px dotted #F0027F; color: #2CB0CF; display: block; font-family: Arial, Helvetica, sans-serif; font-size: 8pt; font-weight: bold; line-height: normal; padding: 3px; text-align: left; } .extended { font-size: 8pt; font-style: normal; margin-bottom: 1ex; width: 400px; font-family: Arial, Helvetica, sans-serif; font-weight: bold; color: Black; } I currently have a PRE tag inside a DIV tag. The DIV tag has a limited size. Often a long line of text will stretch outside the PRE tag. I do not mind this horisontal overflow as the contents has more meaning when it is not wrapped. My problem is that this overflow text flows under the right hand navigation column on my site. I would like the PRE tag to be above everything else on my site. How can I do this? The overflow text seems to have no background, making it hard to read if it is over an image. Is there any way to get overflow text to have a brackground without expanding the PRE tag? My CSS works in IE and Mozilla but not Netscape or Opera I have a 2 column website, built with 2 relative position DIVs, with overflow set to auto. Because of this, I turned off overflow on the body tag and on the html tag (overflow: hidden;). I didn't want to have 2 scroll bars on the right side of the window. When I first tested this on 4 browsers, IE, Mozilla, Netscape and Opera, it worked great, only having one scroll bar on the right side of the window when the page was longer than the window height. But when I moved to a new host server recently, I discovered that Netscape and Opera stopped working. They now simply give me blank screens. When I remove the "overflow: hidden;" specifications from the body tag and the HTML tag in my CSS file, Netscape and Opera once again display my web pages. However, now I get 2 scrollbars on the right side of all 4 browsers (in IE, the second scrollbar isn't actually there, but the space holder for the scrollbar is there). Is there a cross browser way for doing what I'm trying to do? Or am I faced with detecting the browser type on the server-side, and setting the style sheet appropriately? Here are the related parts of my CSS: /* CSS styles */ BODY { font-family : Verdana, Arial, Helvetica, sans-serif ; font-size : 10pt; background : Black; color : White; margin: 0; padding: 0; border-width: 0; overflow: hidden; } HTML { overflow: hidden; } #LeftNavDIV { position:relative; width:185px; height:100%; float:left; padding:2px 0px 0px 0px; margin:0px 0px 0px 0px; border:1px solid white; overflow:auto; } #ContentDIV { position:relative; height:100%; width:75%; float:right; padding:0px 0px 0px 0px; margin:0px 0px 0px 0px; border:0px dashed #336699; overflow:auto; } Hi all, I'm working on the site http://boolarongpress.com.au and have hit a problem. In IE7 if you click into either the title or author search fields in the left hand nav menu the cpu usage maxes out and IE7 hangs. There is no javascript attached to these inputs. The problem seems to be caused by a line in the css, overflow: auto; This is set for the content div so that it scrolls as if it were a frame. If I remove this line from the css the problem dissappears but of course the content div no longer scrolls. Has anyone got any ideas on how I can fix/work around this issue? Cheers, Peter How do I make the DIV overflow in the below codes? It works in IE but not firefox. <html > <head> <style type="text/css"> html, body { height : 100%; } </style> </head> <body> <table style="height : 100%; width : 100%"> <tr style="height : 64px; background-color : Blue;"> <td></td> </tr> <tr style="height : auto; background-color : red;"> <td> <!-- THIS IS THE PROBLEM --> <div style="height :auto; overflow-y : scroll"> <!-- THIS IS THE PROBLEM --> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> asd<br /> </div> </td> </tr> <tr style="height : 64px; background-color : Blue;"> <td></td> </tr> </table> </body> </html> While working on my site, I am testing it in Mozilla Firefox 1.0pr and IE 6. In my code: body, td, iframe, table, div, tr { font-variant: small-caps; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #ffffff; background-color: #666666; scrollbar-3dlight-color: #666666; scrollbar-arrow-color: #666666; scrollbar-base-color: #666666; scrollbar-darkshadow-color: #666666; scrollbar-face-color: #666666; scrollbar-highlight-color: #666666; scrollbar-shadow-color: #666666; } a:link { color: #ffffff; text-decoration: none; } a:visited { text-decoration: none; color: #ffffff; } a:hover { text-decoration: none; color: #ff0000; } a:active { text-decoration: none; color: #ffffff; } select, option, textarea, input { border: #ffffff 1px solid; font-size: 11px; font-variation: normal; font-family: Verdana; background-color: #666666; } I would add "overflow: auto;" right under 'body, td, iframe, table, div, tr {' so that in Mozilla the scrollbars would not show up. However, when I load it in IE, the windows do not scroll at all. Is there a quick-fix for this, or what can I do so it will work properly in both browsers? My page looks decent in Firefox but in IE the overflow property doesn't seem to be working. Perhaps you can give me some pointers as to which tags may be messing up the display in Internet Explorer. The link to the page in question. http://www.paulvincentgandolfi.com/blog/?page_id=123 Thanks what i'm trying to accomplish is two boxes next to each other inside a div, which i can scroll horizontally to see the two boxes. if you copy the code below it works correctly, only because the width of the parent div is set. Code: <style type="text/css"> #container { overflow:scroll; width:100px; } #parent { overflow:hidden; width:400px; } .box1 { border:1px solid black; float: left; height: 101px; width: 101px; } </style> <div id='container'> <div id='parent'> <div class='box1'></div> <div class='box1'></div> </div> </div> if i change width:900px in the parent div to width:auto then the boxes go underneath one another. That's the problem, the parent div should auto adjust to the width of both boxes. i'd really appreciate solving this. i can't have a fixed width on the parent div it should auto adjust and both boxes should be next to each other. this is the code i'm having problems with: Code: <style type="text/css"> body { font: normal 10px Verdana, Arial, Helvetica, sans-serif; color:#666; margin : 0; padding : 0; } /* text */ h1 { font: bold 10px Verdana, Arial, Helvetica, sans-serif; line-height:30px; } /* div classes */ div.row { position:relative; left:10px; width:326px; height:20px; z-index:1; margin-bottom:8px; text-align:right; } div.cell_title, div.cell_content { position:absolute; top:0px; float:left; padding:0px 0px 0px 8px; border:1px solid #E4E4E4; text-align:left; line-height:17px; } div.cell_title { background-color: #E4E4E4; left:0px; width:100px; z-index:2; } div.cell_content { background-color:#FCFCFC; left:100px; width:224px; z-index:3; } /* form elements */ .input { font: normal 10px Verdana, Arial, Helvetica, sans-serif; color:#666; background-color: #FCFCFC; height:15px; width:213px; border:0; } .textarea { font: normal 10px Verdana, Arial, Helvetica, sans-serif; color:#666; background-color: #FCFCFC; height:100px; width:213px; border:0; overflow:auto; } </style> <h1>Contact</h1> <form action="?menu=contact" method="post" name="contact"> <div class="row"> <div class="cell_title"><label for="name">name:</label></div> <div class="cell_content"><input type="text" class="input" name="name" id="name"/></div> </div> <div class="row"> <div class="cell_title"><label for="email">email:</label></div> <div class="cell_content"><input type="text" class="input" name="email" id="email" /></div> </div> <div class="row"> <div class="cell_title"><label for="message">message:</label></div> <div class="cell_content"><textarea class="textarea" name="message" id="message"></textarea></div> </div> <div class="row"> <input type="image" src="includes/images/btn_add.gif" name="Submit" value="Submit"> </div> </form> My problem is that my "row" div's overlay if their content is larger. Because of that i cannot see the send button from my form (the textarea height is bigger that the height of the "row" div - i need the layer to expland according to the content, but i don't want it to overlay on what is after it!). I hope that you understood my problem and could help my with it. Thanks in advance! hi, I have 3 DIV's, The first div is like a menu header DIV and the second DIV is the menu links and the third DIV has some information I want to click on the first DIV then show the second DIV like a menu problem is the third DIV moves down.. How can i let the second DIV overflow over the third DIV without it moving down? Thanks I have an annoying problem that causes my css boxes to overflow in IE. You can see the problem here URL The CSS for these boxes is as follows Code: .rbroundbox { background: url(images/postbackground.gif) repeat; } .rbtop div { background: url(images/topleft.gif) no-repeat top left; } .rbtop { background: url(images/topright.gif) no-repeat top right; } .rbbot div { background: url(images/bottomleft.gif) no-repeat bottom left; } .rbbot { background: url(images/bottomright.gif) no-repeat bottom right; } /* height and width stuff, width not really nessisary. */ .rbtop div, .rbtop, .rbbot div, .rbbot { width: 100%; height: 7px; font-size: 1px; } .rbcontent { margin: 0 7px; } .rbroundbox { width: 60%; margin: 1em auto; } The HTML is Code: <div class="rbroundbox"> <div class="rbtop"><div></div></div> <div class="rbcontent"> <b>[INSERT TITLE]</b> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="100%"> [INSERT NEWS] </td> </tr> </table> <p><font face="Tahoma" size="2">Posted by <a href="mailto:[INSERT EMAIL]">[INSERT REALNAME]</a> at [INSERT DATE]</font></p> </div><!-- /rbcontent --> <div class="rbbot"><div></div></div> </div><!-- /rbroundbox --> What is causing the overflow in IE? it doesnt show up in any other browser I know of. tinyurl(dotcom)/6dw6jp4 Hi everyone I am a newbie here, Please have a look at the above link. The second box which has the therapist images and their names do not appear correctly on IE8. On all other browsers it seems to work fine. Can any one please have a look at the page and let me know a solutions. Thanks a lot. Hi, I'm trying to do a design with: http://xlibrisclients.co.uk/flybynite/new/V1.htm in mind. I want the content to have a scrollbar if content goes off the page... basically want to achieve the look and feel of a frame base site such as: http://www.flybynite.co.uk/website/ but only using CSS and tables. Please help! Janusz This is working fine in FF, but IE ignores it. I have large bottom margin and large negative bottom padding contained in a wrapper with overflow set to hidden, to keep my columns the same length for different content, which seems to be ignored in IE. Other than that I'm pretty happy with the site, but I don't really know what I'm doing, so I don't really know what I'm doing wrong.. Can anyone help? Structure; Code: <div id="divBranding"> </div> <div id="divWrapper"> <div id="divSidebar"> </div> <div id="divContainer"> </div> </div> <div id="divFooterWrapper"> <div id="divInfo"> </div> </div> CSS for body; Code: body { width: 800px; margin-right: auto; margin-left: auto; } CSS for wrapper; Code: #divWrapper { overflow: hidden; *html overflow:scroll; display: block; } CSS for Sidebar; Code: #divWrapper #divSidebar { float: left; width: 198px; margin-bottom: -1999px; padding-bottom: 1999px; position: relative; } And CSS for Content; Code: #divWrapper #divContainer { float: right; width: 598px; margin-bottom: -1999px; padding-bottom: 1999px; position: relative; } And CSS for Footer Wrapper; Code: #divFooterWrapper { width: 800px; margin-right: auto; margin-left: auto; position: relative; clear: both; } Hey everyone, I'm making a photo gallery for a client. What I need is the overflow-x to be hidden, and overflow-y to be visible, but even when i set overflow-y to be visible, it appears with a scrollbar. My code is below... 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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> #galleryContainer{ position:absolute; height:140px; background-image:url(/images/galleryBack.png); background-repeat:no-repeat; width: 536px; } #galleryShow{ position:absolute; width:478px; height:113px; margin-left:28px; margin-top:14px; overflow:hidden; } #galleryView{ position:absolute; width:10000px; } .galThumb{ float:left; height:113px; width: 152px; z-index:60; text-align:center; } #leftArrow{ position:absolute; top:52px; left:7px; } #rightArrow{ position:absolute; top:53px; left:506px; } .galleryArrow{ width:23px; height:37px; z-index:40; } </style> <script src="/js/scriptaculous-js-1.8.3/lib/prototype.js" type="text/javascript"></script> <script src="/js/scriptaculous-js-1.8.3/src/scriptaculous.js" type="text/javascript"></script> <script language="javascript"> galleryLocation = 2; function slideGallery(gallMove,gallIncrement){ new Effect.Scale('thumbImg' + galleryLocation, 70); new Effect.Scale('galleryThumb' + galleryLocation, 94); galleryLocation = galleryLocation + gallIncrement; /*adjust center*/ new Effect.Move('galleryView', { x: gallMove, y: 0}); new Effect.Move('galleryThumb' + galleryLocation, { x: 0, y: -20}); new Effect.Scale('thumbImg' + galleryLocation, 150); new Effect.Scale('galleryThumb' + galleryLocation, 114); } function adjustCenter(){ new Effect.Scale('galleryThumb2', 114); new Effect.Scale('thumbImg2', 150); } </script> </head> <body onload="adjustCenter()"> <div id="galleryContainer"> <div id="leftArrow" class="galleryArrow" onclick="slideGallery(163,-1)"></div> <div id="galleryShow"> <div id="galleryView"> <?php for($i=1;$i<=14;$i++){ echo " <div id='galleryThumb" . $i ."' class='galThumb'> <img src='/images/cupcakeThumbs/galleryThumbs/" . $i . ".JPG' id='thumbImg" . $i . "'/> </div> "; } ?> </div> </div> <div id="rightArrow" class="galleryArrow" onclick="slideGallery(-163,1);"></div> </div> </body> </html> Thoughts? #navList { background-color: #FF0000; height: 10px; overflow: none; width: 600px; float: left; line-height: 0px; } #navList li { float: left; cursor: pointer; overflow: none; } in every other browser the next div after the list touches navList, which contains images that are 42px high. in ie6, there are an extra 2 pixels. at first I put height: 42px; overflow: none, to see what would happen - and nothing did. i set it to 10 for kicks to see if the overflow would do anything at all and it's not. very confused today. Please look at the site I'm designing for my friend he http://www.vpntunnel.net/newsite/ http://www.vpntunnel.net/newsite/css/general.css Notice how #content is running over the specified width, well outside the #container, even. This is noticeable with h1 on the homepage and on the FAQ page. I'm not quite sure what's causing it. Also, if someone could help me center the page in IE, that'd be great. I'd rather not use text-align: center; in the body. |