CSS - X Scrolling And Scaling
I've made an image to explain my problem pretty well :
imgur dot com /n8uOX (apparently I am not allowed to posts links , however its kinda hard for me to explain the problem so its easier to just show it) basically i want my page to always be rendered as I intended it to. I am pretty sure my coding is quite bad and thats what caused the problem , yet if anyone have any way to fix this please post in this thread. Thanks Similar TutorialsGot it sorted now Thanks - Dan. Is there a way to tell a browser to NOT zoom it when the user tries to zoom the text... I ask because I use text in a menu bar that I do not want to scale at all. Thanks How come IE obeys fixed and em font sizes and firefox doesn't? I want all my site text to be scaleable apart from the navigation text which I gave a fixed size of 10px. In IE the scaling is observed and all fonts are em apart from the navigation. In firefox however it scales ALL fonts which is very annoying. Is this a known problem? Hello, I'm new to these forums and I have a question. I am making a website (c-pj.net/lowercase/), and I'm having a problem. If I add too many posts or make a post to long it goes off the page, or at least the text does. What I mean by that is that the text ends up going onto the header and past my content holder image. Can anyone take a look at the source code, and my style sheet and tell me how I could make the height of my content area scale to the proper size, when I try to set it to auto it doesn't display at all. This could be caused by the fact that my content are is absolutely positioned but I'm just looking for some advice hopefully you guys understand my question. My style sheet is located he c-pj.net/lowercase/stylesheets/default.css Hi, I am having a problem with some getting a div to scale to the full height that I want it to. Any help would be much appreciated. Here is the link to the page in question: http://www.paultheillustrator.com/template.html Basically, I have 3 divs (wrapped in another div), floating left of each other. The left and right div are simply background shading images. The center div is where the content (on this page, my blog) is. The centre div and wrapper div heights are set to auto (as I want them to expand with the amount of content in the centre div). However, because of this, the left and right divs (which have no content, just a repeating background image), do not appear. Currently I have their height set to 100%. Any solutions would be much appreciated! Thanks, Paul Here is the CSS: Code: body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-image: url(../images/bg.gif); background-repeat: repeat; font-family:Arial, Helvetica, sans-serif; font-size: 11px; line-height:14px; color:#666666; } html, body { height:100%; } #centre-right a:link { color: #000000; text-decoration: none; background-color:#FFFF00; } a:visited { text-decoration: none; color: #000000; background-color:#FFFF00; } a:hover { text-decoration: underline; color: #333333; } a:active { text-decoration: none; color: #44C3F3; background-color:#FFFF00; } h2{ /*letter-spacing:-1px;*/ color:#999999; font-family: Arial, Helvetica, sans-serif; line-height:20px; font-weight:100; font-size:24px; margin-left:-2px; } #overall_wrapper{ width:737px; height:auto; margin:0px auto; } #main_top{ width:737px; background-image:url(../images/top-main.png); background-repeat:no-repeat; height:198px; } #menu_wrapper{ width:737px; } #left_bar{ width:28px; height:auto; background-image:url(../images/bg_left-strip.png); background-repeat:repeat-y; float:left; } #centre{ background-color:#FFFFFF; height:auto; width:681px; float:left; } #centre-left{ width:168px; height:100%; float:left; margin-left:28px; margin-top:28px; margin-bottom:28px; } #centre-right{ width:428px; height:auto; float:left; margin-left:28px; margin-top:28px; margin-bottom:28px; } #dots{ margin-top: 14px; width:70px; height:14px; background-image:url(../images/arrows-dots.gif); float:left; } #centre-right .blog{ margin-top: 14px; float:left; width: 334px; margin-left:14px; } .header-text{ } #right_bar{ width:28px; height:100%; background-image:url(../images/bg_right-strip.png); background-repeat:repeat-y; float:left; } #footer{ width:737px; height:257px; background-image:url(../images/footer.png); float:left; } I am writing my site in XHTML 1.1 (application/xhtml+xml) entirely using ems. The page scales really nicely with browser text resizes however all of my rounded corners (background images), image bullet points, and any other background images do not. Is there any way to specify the background image width in ems? I think I'm going to have to mix presentational images with content otherwise. Hello everyone, Ive been trying to reconstruct a web design from a photoshop design and it has bars going down the side of a center container where the content is, the problem im having is when the text and such in the content 'rule' goes over one line, prior to what i thought would happen, only the content 'rule' scales to the amount of text and the container rule does nothing. Is there a way to make the container scale with the content and have the bars scale with the container...? Heres the css and the html Code: #container { margin-left: auto; margin-right: auto; top: 0; width: 875px; margin-top: -8px; padding: 0; overflow: visible; background: #FFFFFF; } #secondbar { margin-left: 102px; margin-right: auto; width: 40px; top: 0; position: absolute; background: #4D220F; } #bar { margin-left: 6px; margin-right: auto; width: 96px; top: 0; position: absolute; /*[empty]height:;*/ background: #E3C98E; } #thirdbar { margin-left: 123px; margin-right: auto; width: 21px; top: 0; position: absolute; background: #7F8FA6; } #content { margin-left: 154px; margin-right: auto; top: 0; width: 709px; position: absolute; background: #FFFFFF; } Code: <head> <title>Test</title> <link rel="stylesheet" type="text/css" href= "styles.css"> </head> <body bgcolor="f4f1ea"> <div id="container"><div id="bar"> </div><div id="secondbar"> </div><div id="thirdbar"> </div> <div id="content"> </div></div> </body> Thanks for any help, sorry if its a bit confusing Xidus Hi: I am having trouble implementing a background image using CSS for compatibility with IE7, and if possible, IE6. In my CSS, I have the following code defined Code: body{ margin:0px; height:100%; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: black; background-color:#fff; background-image: url(../images/bg.png); background-repeat: no-repeat; background-attachment: scroll; background-position: absolute; background-size: 100%; } /* body{ margin:0px; height:100%; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: black; background: #fff url(../images/bg.png) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } */ The results work fine in Chrome, Safari and Firefox on both PC and Mac. However, the image does not scale and gets cropped in IE7. I have tried it two different ways, both of which are in the code, and one of which is commented out. Neither way works properly with IE7. Does anyone have a solution to this that they could share with me. Thanks. Prior to doing any serious mobile work, I learned if you had an image that was mostly decorative and didn't need to be read as part of the content, you used a background image. In today's world you have to support many mobile devices. There's a nice trick with <img> tags where you give them a max-width of 100%, and they will scale down proportionately on mobile devices. As far as I can tell, there isn't quite as good of a solution for background-images. Say I have a background image in a div, and I set the dimensions to match the background size - 600 x 300. To allow it to scale down on mobile devices, I set a max-width of 100%. But that doesn't scale the background image down, just crops it. So I set background-size: contain, which makes the background scale, but the div is still 300px tall. And that's where I run into the problem. How do I tell the div to only be as tall as its background? Am I missing something? I am just trying to create a simple layout, where there are specific margins around two color boxes. I'd like the color boxes to fill the space between the margins, 100% and to each take of 50% of height. I have kind of faked it...but I know there must be a better way. Any help would be great. Thanks. http://www.skimdesign.com/projects/mnomentana/ I have also reworked the code a bit, finding that if the position isn't "absolute" somewhere, the boxes won't show at all. Not sure why this is. But here is the reworked code: body { margin:20px 15px 10px 100px; font-family: trebuchet, verdana, sans-serif; } #leftcontent { float:left; width:25%; background:#fff; } #rightcontent { position: absolute; width:75%; height:100%; min-height:100%; } #green{ height:50%; min-height:50%; background-color:#CCFF33; } #grey{ height:50%; min-height:50%; background-color:#999999; } thanks. Hi all, I have a problem in scaling images, I re-size all images by -50% to make them act as thumbnails at the following address: http://www.magic-photography.co.uk/photoselector.html It works fine in Chrome using the following simple CSS: Code: a img { border: none; height: 50%; width:auto; text-align: left; } however in IE/Firefox the images do not re-scale at all. Very very grateful for any help offered. Thanks I have an image I want to display in a <td> cell, that scales with the cell dimensions. How do I do that? Hey guys!! I got a quick question. I have a CSS layout page with 2 scrollbars. The first one for a news section and the second for a product. I have a lot of content for both sections, The scrollbars work fine, but on the main IE the scrollbars keep adjusting to the content that I have. if i have less content then its small..... I want to have no scrolling on my main window. Good morning, I have a problem with a layer(div) that I am putting over my page everytime the user clicks a button and a transaction is send to the host. My problem is that if there is an scroll and the user scroll, the message scrolls up and dissapears. I need to fix it to the center of the screen. I have tried with % instead of absolute px. Can anyone help me, please?. I am close to my deadline, so any help would be really apreciated. I am attaching my code: window.onbeforeunload=new Function("Procesando.style.visibility='visible';"); window.onblur=new Function("Procesando.style.visibility='hidden';"); //window.onfocus=new Function("Procesando.style.visibility='hidden';"); document.write('<div style="position:absolute; top:160; left:313; visibility:hidden; overflow:hidden; background-color:#CCCCCC; clip:rect(12,177,50,3); " id="Procesando">\n'+ '<select size=4 name="cbEspera" class="TextoTablaIzq" style="background-color:#CCB8E0; font-Weight:bold;">\n'+ '<option> </option>\n'+ '<option> Procesando su petici'+unescape("%F3")+'n. </option>\n'+ '<option> Espere por favor... </option>\n'+ '<option> </option>\n'+ '</select></div>\n'); Hi guys, I've this div with overflow:auto. This div is populated using xmlhttprequest (it's an IM chat) so it will be getting full to the point where there's an overflow and the scrollbar shows up. What I would like to do is, whenever a new content line was added to the div (I'm using DOM to do so), the scroll (if overflow has happened) would go all the way down in a way where the last line of visible text in the div would always be the last line inserted. I'm somewhat newbie at this stuff so, any help in the right direction would be great! Thx Hugo http://www.rodoslovlje.com/ Use IE e.g. Does anyone know how I can fix this. Thnx Dear all, I have been working to implement a scrolling table into an xml / xsl interface and so far have managed to put together an acceptable version using <thead> and <tbody> syntax. Indeed, for the html examples that I found out there, this seems to work perfectly. On the surface it also works perfectly in my xml / xsl implementation too (html underneath). Indeed, using IE6*, you can take a look at a cut-down example by going to this link ... http://alse.load4.net/scrollproblem/scrollproblem.xml ... and then selecting 'Milan', 'Report Test' and clicking on 'Run'. This gives a nice scrolling list which is exactly what I want. However ... If you scroll to the bottom of the list in the scrolling area (the list is short as I have removed most of the data and all the reports except for this one) and then resize the window, the headers are distorted. With more data (which is normally the case for us) the distortion is even worse. I have spent many hours tweaking my CSS (contain in the XSL file for convenience) and the HTML but just can't get rid of the 'distortion-on-resize' problem. I am hoping that either ... a.) There is a way to block the browser from being resized (I don't know if there is?) ... or ... b.) Someone can take a look at my syntax and offer a suggestion to sort this out. The source code can be obtained by clicking on the two hyperlinks 'xml file' and 'xsl file' included in the link. Indeed, I believe that the problem (and solution) may lie in some dynamic CSS declarations ( e.g. top: expression(offsetParent.scrollTop); /*IE5+ only*/ ) which I have obtained from various examples but don't understand completely. Many thanks for any help that you can give as this could be a great little tool if we can sort out this last hurdle. Regards, Alan Searle *: This solution is only designed to work with IE as that is what we have in-house. CSS: Here are the CSS declarations which are contained in the XSL file ... [code] <style type="text/css" media="screen"> table {width: 99%; background-color: #E2EFFE; border-style: solid; border-collapse:collapse; border-color: #316AC5;} table.displayframe { background-color: white; border: solid 1px #316AC5;} h1 {margin-top: 1em; font-variant: normal;} h2 {margin-left:5px;} h3 {margin-left:5px;} div.tableContainer { width: 100%; /* table width will be 99% of this*/ height: 344px; /* must be greater than tbody*/ overflow: auto; margin: 0 auto;} table.cont { width: 98%; /*100% of container produces horiz. scroll in Mozilla*/ border: none; background-color: #E2EFFE;} table.cont>tbody { /* child selector syntax which IE6 and older do not support*/ overflow: auto; height: 301px; overflow-x: hidden;} thead.cont tr { border: none; position:relative; top: expression(offsetParent.scrollTop); /*IE5+ only*/ } thead.cont td, thead.cont th { font-size: 14px; background-color: white; color: blue; border: none; /* border-top: solid 1px #d8d8d8; */ } td.cont { color: #000; padding-right: 2px; font-size: 8px; border-bottom: solid 1px #d8d8d8; border-left: solid 1px #d8d8d8;} table.cont tfoot tr { /*to help IE*/ position: relative; overflow-x: hidden; top: expression(parentNode.parentNode.offsetHeight >= offsetParent.offsetHeight ? 0 - parentNode.parentNode.offsetHeight + offsetParent.offsetHeight + offsetParent.scrollTop : 0); } a:link {text-decoration: underline;} a:hover {text-decoration: underline; color: #851D9E;} a:visited {text-decoration: underline; color: #8080C0;} </style> I was wondering if there was a way with CSS, to create a box, where the text within automatically scrolls. For example, I have a box that has a date, and then the latest news. Say that there are about 20 lines worth of text, but the box itself, is only 10, I wanted the text to scroll from bottom to top automatically. I know I could probably do something like this in flash, and I'm guessing javascript as well. But don't want to use javascript. Any help would be appreciated. Thanks. Can anyone tell me where I can get some info on CSS? Specifically I am trying to create sort of a news page, which will have a box that contains news articles that slowly scroll upwards until they disppear and then raeppear at the bottom at the bottom of the box again. I know this can be done with CSS and I've kind of accomplished what I want. The problem is that I'm using seperate elements for each article title. Therefore, only one article title scrolls through the box at the time since I can only make one element visible. Mabye, it will make more sense when you see my code. I want to basically be able to have the other news article titles begin to scroll underneath each other, not having to wait for the news article title above it to finish scrolling before the next article enters the box. I hope this makes sense! here is the code: <HTML> <HEAD> <SCRIPT LANGUAGE="JavaScript"> function init() { nos = 1; items = 6; posY = 130; scroller(); } function scroller() { if (nos == items + 1) { nos = 1; } elemID = 'elem'.concat(nos); objDOM = document.all[elemID].style; objDOM.visibility = "visible"; posY -= 1; objDOM.top = posY; if (posY <= 50) { objDOM.visibility = "hidden"; posY = 130; nos += 1; } setTimeout ("scroller()",10); } // --> </SCRIPT> <STYLE TYPE="text/css"> <!-- #elem1 {position:absolute; visibility:hidden; left:35; top:0; z-index:5} #elem2 {position:absolute; visibility:hidden; left:35; top:0; z-index:5} #elem3 {position:absolute; visibility:hidden; left:35; top:0; z-index:5} #elem4 {position:absolute; visibility:hidden; left:35; top:0; z-index:5} #elem5 {position:absolute; visibility:hidden; left:35; top:0; z-index:5} #elem6 {position:absolute; visibility:hidden; left:35; top:0; z-index:5} #screen {position:absolute; visibility:visible; left: 20px; top:50px; z-index:0} --> </STYLE> </HEAD> <BODY onLoad="init()"> <DIV ID="elem1"><FONT COLOR="#000000"> News & Events- article 1 </FONT></DIV> <DIV ID="elem2"><FONT COLOR="#000000"> News & Events- article 2 </FONT></DIV> <DIV ID="elem3"><FONT COLOR="#000000"> News & Events- article 3 </FONT></DIV> <DIV ID="elem4"><FONT COLOR="#000000"> News & Events- article 4 </FONT></DIV> <DIV ID="elem5"><FONT COLOR="#000000"> News & Events- article 5</FONT></DIV> <DIV ID="elem6"><FONT COLOR="#000000"> News & Events- article 6</FONT></DIV> <DIV ID="screen"> <TABLE WIDTH=350 HEIGHT=120 BORDER=0 BGCOLOR=#808080> <TD></TD></TABLE> </DIV> </BODY> </HTML> |