HTML - <div.....>content</div> Help
First I would like to know if there is a better way of doing this. <div></div> is the only way I know of doing it although others have told me they didn't even know it could be done with <div></div>.
Second I would like to know if there's some way to control the speed at which the box scrolls. Third If the content is text then I want the scroll function to be vertical. There's other times I need the scroll to be horizontal. Here is the code: HTML Code: <div style="background-color: black; border-bottom-color: rgb(212, 47, 212); border-bottom-style: solid; border-bottom-width: 2px; border-left-color: rgb(212, 47, 212); border-left-style: solid; border-left-width: 2px; border-right-color: rgb(212, 47, 212); border-right-style: solid; border-right-width: 2px; border-top-color: rgb(212, 47, 212); border-top-style: solid; border-top-width: 2px; font-size: 11px; height: 200px; overflow-x: auto; overflow-y: auto; width: 200px;"> <span style="color:#ffffff;">CONTENT HERE</span></div> This is what the code looks like when viewed in Chrome and Firefox. However when used in IE the content can often move through the boarders. Similar TutorialsHi, Im trying to make my footer content align correctly to the main content when a window resizes. The apdivs don't seem to want to move at all even with a relative position etc. I have tried everything but just cant get it to work can someone help please? http://pjm.co.uk.uksite4.yourwebserv...splay&PageID=5 Also some one commented before on the amount of css and JS pages. These will al be stripped out as its an Open sources system im using! Thansk alot Joe Hey guys, I used to know a lot about html, but then just completely stopped doing anything with websites for too long. I was just wondering how I can replace a word or number with a specified word or number. What I want to achieve: I've got a forum with a couple thousand members and it's picking up in activity and I want to make some names stand out for being helpful. I want to replace their names with an image. But to do so, it'd have to be a code made and added into the footer template. Because obviously I can't edit a username for html image code. So I just need the code to find all instances of a certain username and replace it with what I specified. ------------- Man I really wish I remembered how to do this haha. Thanks guys. Hey i have a drop down menu...when i select a particular name from it...it should hide all the other content on the page other than the header <h3> being selected and the content of h3...which can either be encloded in <br> or <table> tag hi, i have a problem i don't know how to solve. i have a web template i designed and in the middle of the template i have something written. now what i need to do is when user clicks on the button it should load the different page that has everything the same except the middle text. i know i can do this by creating a new template and just put in the different text in ti and then create a link to this page but when you have a hudge amount of different middle data it becomes pretty difficult to administrate all. so my question know is how to create a template html script that can only change its middle context by loading different txt file so i don't have to write a new html template for every text file that i want put into my page sorry if this is not written properly but i'm still learning.... thnx When I start adding the content to my website, it pops up on top of the menu and the logo in the top of the page? Do you know what I can do to get it under the menu? Here is my HTML and CSS Code HTML Code: HTML Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset-UTF-8" /> <title>Andersen Undercover Records</title> <link rel="stylesheet" type="text/css" href="page.css" /> </head> <body> <ul id="nav"> <TABLE BORDER=0 BORDERCOLOR=black width="700"> <TR><td> <li><a href="#">HOME</a></li></td> <td><li><a href="#">ARTISTS</a></li></td> <td><li><a href="#">MUSIC</a></li></td> <td><li><a href="#">NEWS</a></li></td> <td><li><a href="#">VIDEOS</a></li></td> <td><li><a href="#">PHOTOS</a></li></td> <td><li><a href="#">ABOUT</a></li></td> <td><li><a href="#">CONTACT</a></li></td> </tr> </ul> <div id="content"> </body> </html> CSS CODE Code: * { margin: 0; padding: 0; } body { font-size: 62.5%; font-family: Helvetica, sans-serif; background: url(images/background.png) repeat-x top } li { font-size: 1.2em; } p { font-size: 1.0em; line-height: 1.4em; margin-bottom: 0.8em; } ul#nav { height: 290px; width: 894px; margin: 0 auto; background: url(images/logo.png) no-repeat; list-style: none; } ul#nav li a { display: block; margin-top: 298px; float: left; width: 50px; margin-left: 52px; color: grey; font-weight: bold; text-decoration: none; padding-top: 2px; } ul#nav li a:hover, ul#nav li a:active { color: white; div#content { padding-bottom: 50px; float:left; } div#footer { background: url(images/) color: white; padding: 10px 0 10px 0; text-transform: uppercase; border-top: 0px solid black; text-align: center; } Hey guys, need a little help with a site im playing with right now. I have a basic site (header, footer, nav, content, and promo area) i use ul, li, a for the nav. When i hover my navigation links it supposed to display black for 1st and second level, and i use the visibility element for anything higher than than. However when i hover i can see my navigation but alot of it is hidden behind my content. Any Ideas. Thanks In Advance for any help. P.S. Just another quick question i created my own java carousel and it works great but i want to add links in my nav to a specific "slide" in my carousel which i think woulod require a link to the page and to call a javascript function at the same time is this possible or is there another way to do it. I have a problem with LI content alignment in menu. You can see the problem on http://toolbardev.com site. "Thunderbird and Outlook Development" menu item looks ugly. How can I align "Outlook Development" part? This question might be rather basic. I'm not a web-developer, though I have a lot of other coding experience. As part of an internal webpage I'm creating, I want to access a webservice that returns a string and display it on the page. The service is accessed by URL, and requires parameters that are dynamically generated base upon the request parameters, so I can't just use #include. What I want to see is something like this, where the number string is provided by the webservice: Authorization code: 1343-7205-7570-8264 I tried this: Code: Authorization code: <object type=text/plain data="http://blah/service?params"></object> IE doesn't output the resulting string. Firefox does output the string, but it's not cleanly inlined with the rest of the text. It has it's own big block of the screen that the text sits in. Is there a simple way to insert the text from a dynamically generated URL into the current page? Hi all, brand new here. I'm working on a simple website for a project I'm doing with a friend, but I'm having a problem with the layout. The site is www.Project217.com. On my Macbook, the content on all of the pages appears centered, which is where I want it. Firefox, Safari and IE all display properly. However, on my Windows computer at work all of the content within the black section of the pages is aligned to the left. Is there an issue with my source code that I'm missing? Thanks for any help, Aaron I have a page that is not being centered on the background in both IE 6&7 but looks perfect in FF. I am not sure what is wrong because the template I used is vaild Here is the page http://www.mesquitechristmas.com/wea...Z119&icao=KHQZ I have been banging my head all day an maybe just need another pair of eyes. -Thanks Hey guys i used to mess around doing simple sites but haven't messed with it for a few years and I about forgot everything.. Now what I'm trying to do here is make my content box stretch as more content is added but when I do it now it breaks my page.. Can anyone direct me to how to fix this problem.. here is what I mean. http://img687.imageshack.us/i/fixprob.jpg/ I need to do this without making my box a scroll bar box as I want it to just stretch down my page. My background where content should stretch is a solid color and my sides are all even as well so it should flow fine I just don't remember how to do this. Thanks in advance. Hi, I have a question to all. How can I made 100% header (bg only), normal content area (fixed width) then 100% box and below normal content area (fixed wifth and at last 100% footer. Hello to all experts in HTML, I want to know, because when I try to print the contents of a DIV I print all text except the images. I created a DIV centered on my page, and inside there is some text and a background image. I haven't used the <IMG> tag for the background image but the style: background-image:#; <div> <a class="print" href="#" onclick="window.print()"><img src="icon.png" /><br />Print</a> <div id="content"> <p> eccc...... </div> </div> Can you please explain me, why I did not print from what I see from my browser? Thank you! ps. Sorry for my bad English. Hi!!! It's my fist post here, so i'll try to make it good My problem is: I want to show an embed video to only users, who press my link. e.g, Someones press my link, and it unlocks the frame, where the video is. Even better would be if it could know, that the person pressed like 5 times this week, and so after 5 times (at different days), it would unlock content. But I could get myself with the first too... So could anybody show me, how to do that P.S. I'm Lithuanian, so I'm sorry for my poor English skills. MUCH THANKS!!! how can i put html table in a .doc file without border. That means i dont want to show border of html table in doc file. i put the border="0" but doc file display border by default. may anyone help. This is my first post, and I am new to html so here goes. I am working on a project using google earth. I need to have the screen divided into a quad panel. I was using a table 2x2 to do this, but the project has progressed to needing a little more than just a table. So as of now I have 2 divs and only one will display the plugin. I am not even sure if I am in the right direction, but here is my code. <style type="text/css"> <!-- #pane1 { border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #000000; border-right-color: #000000; border-bottom-color: #000000; border-left-color: #000000; height: 50%; width: 50%; left: 0px; top: 0px; } #pane2 { border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #000000; border-right-color: #000000; border-bottom-color: #000000; border-left-color: #000000; height: 50%; width: 50%; right: 0px; top: 0px; } </style> <div id="pane1"> <script src="http://www.google.com/jsapi? key=ABQIAAAA1XbMiDxx_BTCY2_FkPh06RRaGTYH6UMl8mADNa0YKuWNNa8VNxQEerTAUcfkyrr6OwBovxn7TDAH5Q"></script> <script type="text/javascript"> var ge; google.load("earth", "1"); function init() { google.earth.createInstance('pane1', initCallback, failureCallback); } function initCallback(instance) { ge = instance; ge.getWindow().setVisibility(true); // add a navigation control ge.getNavigationControl().setVisibility(ge.VISIBILITY_AUTO); // add some layers ge.getLayerRoot().enableLayerById(ge.LAYER_BORDERS, true); ge.getLayerRoot().enableLayerById(ge.LAYER_ROADS, true); // in this sample we will attempt // to fetch a KML file and show it function finished(object) { if (!object) { // wrap alerts in API callbacks and event handlers // in a setTimeout to prevent deadlock in some browsers setTimeout(function() { alert('Bad or null KML.'); }, 0); return; } ge.getFeatures().appendChild(object); var la = ge.createLookAt(''); la.set(37.77976, -122.418307, 25, ge.ALTITUDE_RELATIVE_TO_GROUND, 0, 0, 500); ge.getView().setAbstractView(la); } // fetch the KML var url = 'http://example.com/' + 'kml/Network_links/RMLS/NL_Sched_rmls_Outages_by_Creator_and_Int.kml'; google.earth.fetchKml(ge, url, finished); document.getElementById('installed-plugin-version').innerHTML = ge.getPluginVersion().toString(); } function failureCallback(errorCode) { } </script> <body onLoad="init()" > </div> <div id="pane2"> <script src="http://www.google.com/jsapi? key=ABQIAAAA1XbMiDxx_BTCY2_FkPh06RRaGTYH6UMl8mADNa0YKuWNNa8VNxQEerTAUcfkyrr6OwBovxn7TDAH5Q"></script> <script type="text/javascript"> var ge; google.load("earth", "1"); function init() { google.earth.createInstance('pane2', initCallback, failureCallback); } function initCallback(instance) { ge = instance; ge.getWindow().setVisibility(true); // add a navigation control ge.getNavigationControl().setVisibility(ge.VISIBILITY_AUTO); // add some layers ge.getLayerRoot().enableLayerById(ge.LAYER_BORDERS, true); ge.getLayerRoot().enableLayerById(ge.LAYER_ROADS, true); // in this sample we will attempt // to fetch a KML file and show it function finished(object) { if (!object) { // wrap alerts in API callbacks and event handlers // in a setTimeout to prevent deadlock in some browsers setTimeout(function() { alert('Bad or null KML.'); }, 0); return; } ge.getFeatures().appendChild(object); var la = ge.createLookAt(''); la.set(37.77976, -122.418307, 25, ge.ALTITUDE_RELATIVE_TO_GROUND, 0, 0, 500); ge.getView().setAbstractView(la); } // fetch the KML var url = 'http://example.com/' + 'kml/Network_links/RMLS/NL_Sched_rmls_Outages_by_Creator_and_Int.kml'; google.earth.fetchKml(ge, url, finished); document.getElementById('installed-plugin-version').innerHTML = ge.getPluginVersion().toString(); } function failureCallback(errorCode) { } </script> <body onload="init()" > </div> Here is my website for starters: http://divinedragons.tk If you navigate to my Schedules page, you can see there is an embedded calendar. At the bottom of this calendar, there is a line of text saying: "Want to add an event to this schedule? Contact us by clicking on the link above, and we will post it as soon as possible." I view this website on the current computer I'm using on Firefox, and the line of text can be viewed just perfectly. On my other networked computer, however, in MSN Explorer, i view the same page, but the same line of text seems to be too large, and it cuts off half the phrase. I was thinking the screen resolution was different, and that caused the text to be cut off in the browser. Yet i think there is a way for this line of text to be viewable on any computer, regardless of any screen resolution. I put the embedded code in a table format, as it is currently. The embedded code is with between the tags <TABLE><TD> and </TD></TABLE>. I remember looking somewhere that putting code in a table would cause it to appropriately "resize" itself in any monitor/screen resolution/browser size. Apparently it does not. So, I came here to ask an HTML expert if there is any way for my embedded calendar's footer text to be fully viewed, in any screen resolution or browser. Thanks for your time, and thanks so much in advance. http://modyourwii.com/homebrew.html Nothing below the "Wad files" graphic shows up in IE6. In FF it shows up fine, but IE6 won't budge. Halp? Hi, I have a table containing 2 nested tables. The left nested table contains a vertical navigation menu, and the right nested table I want to use for content. I want to be able to click a link on the navigation menu, and only have the content in the right nested table change, without having to reload a new page everytime. The reason I want to do it this way is to edit one set of links and not have to copy and paste the menu into each new page I create. Otherwise link management becomes a real hassle when I make future changes. Thank you. Hi How do i resize the website that fits in to an iframe? Thanks mrdeleigh |