HTML - <div> Problem Getting Content To Work
Yesterday, someone on this forum helped me get a floating image to display correctly in my header: http://www.toddcary.com/pvrc/test1/header.html
So, I though I was home free. Not so! I can't get a <div id="content"> tag to work correctly with the "header divisions": http://www.toddcary.com/pvrc/test1/header1.html First, I do not understand why the right and left are not 100% width. Secondly, if I try to add a left column, the logo.gif sets the left position for the column! http://www.toddcary.com/pvrc/test1/header2.html As you can deduce, I am trying to move into using divisions rather than tables with some difficulty. Any help is GREATLY appreciated! Todd Similar TutorialsHi all, I am a little lost here.. I am programming a page where many images load. It happens that the next time you visit the page, updated images with the same filename should load, but the older version of the image loads instead. I am guessing that it finds the image in the cache, with the same filename, and loads that one, thinking it's the image it's looking for. That being said, I have looked through so many forums to find a solution that would make it re-download fresh content of the page directly from the server, rather than from the cache. here is the code that seems fairly unanimous: <META HTTP-EQUIV="Expires" CONTENT="-1" /> <META HTTP-EQUIV="Pragma" CONTENT="no-cache" /> <META HTTP-EQUIV="Cache-Control" content="no-store" /> <META HTTP-EQUIV="Cache-control" CONTENT="no-cache" /> <META HTTP-EQUIV="Cache" CONTENT="no-cache" /> <META HTTP-EQUIV="Expires" CONTENT="thu, 01 Jan 1998 12:00:00 GMT" /> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> But still with this code in the head tag, the updated images don't get loaded from the server... Any ideas?? Thanks so much, Steph 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> I have a content alignment issue in IE and I can not find the problem anywhere. In FF it looks perfect but in IE the content is at the bottom of the page and I do not know what or what I am overlooking and missing. I don't know if it is the php throwing it off. I wouldn't think so though. Here is the page: http://www.mesquitechristmas.com/local/display.php?id=2 Here is the code: PHP Code: <?php include ('db_connect.php'); if (isset($_GET['id'])) { $id = mysql_real_escape_string($_GET['id']); $sql = "SELECT * FROM users WHERE id = $id;"; if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { $row = mysql_fetch_array($result); $displayname = $row["displayname"]; $displaytype = $row["displaytype"]; $address = $row["address"]; $city = $row["city"]; $state = $row["state"]; $postal = $row["postal"]; $country = $row["country"]; $rating = $row['rating']; $votes = $row['votes']; $imgurl = $row['imgurl']; $comments = $row['comments']; } else { die("No user found"); } } else { die(mysql_error()); } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="description" content="Mesquite Texas Country Christmas" /> <meta name="keywords" content="Mesquite, Texas, Country Christmas" /> <meta name="author" content="NA" /> <link rel="stylesheet" type="text/css" href="/stylesheet.css" media="screen" title="FBC" /> <script type="text/javascript" src="drop_down.js"></script> <title>A Mesquite Country Christmas</title> </head> <body> <div id="wrap"> <a href="/index.html"> <img id="frontphoto" src="/images/header.png" width="760" height="237" alt="Mesquite Country Christmas" border="0"></a> <div id="menu"> <h2 class="hide">Menu:</h2> <ul id="avmenu"> <li><a href="/index.html">Home</a></li> <li><a href="/christmasstory.html">The Christmas Story</a></li> <li><a href="/directions.html">Directions</a></li> <li><a href="#">Information</a><ul> <li><a href="/information.html">Display Facts & Info</a></li> <li><a href="/faq.html">FAQ</a></li> <li><a href="/playlist.html">2008 Playlist</a></li> <li><a href="#">Christmas History</a></li> </ul></li> <li><a href="#">Photos</a> <ul> <li><a href="/2007photos.html">2007</a></li> </ul></li> <li><a href="#">Videos</a> <ul> <li><a href="/2007videos.html">2007</a></li> </ul></li> <li><a href="/guestbook.php">Guestbook</a></li> <li><a href="/webcam.html">Web Cam</a></li> <li><a href="/webradio.html">Internet Radio</a></li> <li><a href="http://www.noradsanta.org/" TARGET="_blank">Track Santa</a></li> <li><a href="/projects.html">Projects & How Tos</a></li> <li><a href="/links.html">Links</a></li> <li><a href="/contact_us.html">Contact Us</a></li> </ul> <center><a href="http://www.toysfortots.org/" TARGET="_blank"><img src="/images/toys_for_tots.jpg" border="0" width="110" height="153" vspace="10"></a></center> <center><a href="http://christmas.bronners.com/2007/house/534.html"><img src="http://christmas.bronners.com/voteforme/vote.jpg" border="0" width="110" height="153" alt="christmas decorations" vspace="10"></a></center> </div> <div id="content"> <div class="fadebox"> <h2><? echo $row['displayname']; ?></h2> <hr /> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="center"><img src="<? echo $row['imgurl']; ?>" class="border" height="345" width="460"></td> </tr> <tr> <td> <table align="center"><tr><td>Rated 0 from 0 people | <b>Rate This</b>: <a href="displays.php?id=<?php echo $row['id']; ?>&rate=1">1</a> | <a href="displays.php?id=<?php echo $row['id']; ?>&rate=2">2</a> | <a href="displays.php?id=<?php echo $row['id']; ?>&rate=3">3</a> | <a href="displays.php?id=<?php echo $row['id']; ?>&rate=4">4</a> | <a href="displays.php?id=<?php echo $row['id']; ?>&rate=5">5</a> </td><td> </td></tr></table></td></tr></table> <table align="center" style="border-top: 1px solid rgb(51, 102, 51);" border="0" cellpadding="4" cellspacing="0" width="100%"> <span class="title">About this Display...</span> <tr><td class="bg2" width="100"><b>Display Name</b>:</td><td class="bg2"><? echo $row['displayname']; ?></td></tr><tr><td class="bg1"><b>Display Type</b>:</td><td class="bg1"><? echo $row['displaytype']; ?></td></tr><tr><td class="bg2"><b>Description</b>:</td><td class="bg2"><? echo $row['description']; ?></td></tr><tr><td class="bg1"><b>Address</b>:</td><td class="bg1"><? echo $row['address']; ?><br><? echo $row['city']. "," . $row['state']. " " . $row['postal']; ?><br><? echo $row['country']; ?><br><a href="http://www.mapquest.com/maps/map.adp?searchtype=address&formtype=search&countryid=US&addtohistory=&country=US&address=<? echo $row['address']; ?>&city=<? echo $row['city']; ?>&zipcode=<? echo $row['postal']; ?>&historyid=&submit=Get+Map" target="_NEW"><b>Get Directions</b></a></td></tr><tr><td class="bg2"><b>Website</b>:</td><td class="bg2"><a href="<? echo $row['website']; ?>" target="_blank"><? echo $row['website']; ?></a></td></tr><tr><td class="bg1"><b>Sponsor Links</b>:</td><td class="bg1"> <script type="text/javascript"><!-- google_ad_client = "pub-8048181801684156"; //displays google_ad_slot = "4239948836"; google_ad_width = 234; google_ad_height = 60; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </td></tr></table> </div> </div> </div> <div id="footer"> © 2007 Mesquite Country Christmas <br /> <br /> <script type="text/javascript"><!-- google_ad_client = "pub-8048181801684156"; //468x60, created 1/8/08 google_ad_slot = "0360766123"; google_ad_width = 468; google_ad_height = 60; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div> </div> </body> </html> If anyone can help me with this that would be great! -Thanks Hi I have a page designed to be centered in the browser... not a problem. However, I have just added a drop down menu (taken from http://www.dynamicdrive.com/dynamici...rome/index.htm) and now the divs which contain the drop down content seem to be centering inside the browser as opposed to sitting under the menu titles like they should. In other words, they are behaving independently of the top level menu... not good! Here's the link - http://www.horizonwebsites.co.uk/snoworks/ I've tried many little changes but I'm definately missing something here. Any help would be great. Kev I believe the problem is that the fact that the pictures are using an absolute position. Not sure though. I have tried about 4 or 5 different thing to fix this to no avail. I will copy in the code for you to see. I do not have this running on a server for everyone to load but it is not much code. Any help would be greatly appreciated. Thansk, Dano HTML Code: <html> <head> <title>Official Site of Premier Security Group, Inc.</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> .centerContainer { margin: 0 auto; } body { background-image:url(images/bkgd2.png) } #Table_01 { position:absolute; left:0px; top:0px; width:800px; height:1200px; } #PSindex-01 { position:absolute; left:0px; top:0px; width:800px; height:69px; } #PSindex-02 { position:absolute; left:0px; top:69px; width:20px; height:174px; } #PSindex-03 { position:absolute; left:20px; top:69px; width:760px; height:174px; } #PSindex-04 { position:absolute; left:780px; top:69px; width:20px; height:174px; } #PSindex-05 { position:absolute; left:0px; top:243px; width:800px; height:13px; } #PSindex-06 { position:absolute; left:0px; top:256px; width:20px; height:35px; } #PSindex-07 { position:absolute; left:20px; top:256px; width:126px; height:35px; } #PSindex-08 { position:absolute; left:146px; top:256px; width:129px; height:35px; } #PSindex-09 { position:absolute; left:275px; top:256px; width:125px; height:35px; } #PSindex-10 { position:absolute; left:400px; top:256px; width:1px; height:944px; } #PSindex-11 { position:absolute; left:401px; top:256px; width:123px; height:35px; } #PSindex-12 { position:absolute; left:524px; top:256px; width:130px; height:35px; } #PSindex-13 { position:absolute; left:654px; top:256px; width:126px; height:35px; } #PSindex-14 { position:absolute; left:780px; top:256px; width:20px; height:35px; } #PSindex-15 { position:absolute; left:0px; top:291px; width:400px; height:909px; } #PSindex-16 { position:absolute; left:401px; top:291px; width:399px; height:909px; } </style> </head> <body style="background-color:#FFFFFF; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px;"> <div class="centerContainer"> <div> <div id="Table_01"> <div id="PSindex-01"> <img src="images/PSindex_01.png" width="800" height="69" alt=""> </div> <div id="PSindex-02"> <img src="images/PSindex_02.png" width="20" height="174" alt=""> </div> <div id="PSindex-03"> <img src="images/PSindex_03.png" width="760" height="174" alt=""> </div> <div id="PSindex-04"> <img src="images/PSindex_04.png" width="20" height="174" alt=""> </div> <div id="PSindex-05"> <img src="images/PSindex_05.png" width="800" height="13" alt=""> </div> <div id="PSindex-06"> <img src="images/PSindex_06.png" width="20" height="35" alt=""> </div> <div id="PSindex-07"> <img src="images/PSindex_07.png" width="126" height="35" alt=""> </div> <div id="PSindex-08"> <img src="images/PSindex_08.png" width="129" height="35" alt=""> </div> <div id="PSindex-09"> <img src="images/PSindex_09.png" width="125" height="35" alt=""> </div> <div id="PSindex-10"> <img src="images/PSindex_10.png" width="1" height="944" alt=""> </div> <div id="PSindex-11"> <img src="images/PSindex_11.png" width="123" height="35" alt=""> </div> <div id="PSindex-12"> <img src="images/PSindex_12.png" width="130" height="35" alt=""> </div> <div id="PSindex-13"> <img src="images/PSindex_13.png" width="126" height="35" alt=""> </div> <div id="PSindex-14"> <img src="images/PSindex_14.png" width="20" height="35" alt=""> </div> <div id="PSindex-15"> <img src="images/PSindex_15.png" width="400" height="909" alt=""> </div> <div id="PSindex-16"> <img src="images/PSindex_16.png" width="399" height="909" alt=""> </div> </div> </div> </div> </body> </html> Hi, I have problem with XHTML CSS vertical align middle. It works with Firefox but not with IE6. Many people has IE6 still so I need to get it to work. HTML Code: <div style="height: 128px;">text</div> How would I middle vertical align the text? HTML Code: <div id="table_small"><div id="table_vm">Special Offer</div></div> HTML Code: #table_small { background-image: url('images/table.jpg'); width: 128px; height: 22px; border: 1px solid #5a5a5a; font-family: Verdana; font-size: 10px; color: #e0e0e0; text-align: center; display: table; } #table_vm { display: table-cell; vertical-align: middle; } Hi, 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 I have this: Code: <script language="Javascript1.2"> document.write('<a href=onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('nav_email','','images/nav_email-over.gif',1)" "javascript:void(0)" onclick=window.open("/recommend/recommend.php?loc='+window.location.href+'","","height=280,width=230,top=150,left=300,toolbar=no,menubar=no,location=no,status=no,resizable=0")><img src="images/nav_email.gif" alt="email page" name="nav_email" width="29" height="24" class="imgborder1"></a>'); </script> but the image wont show up. I have an image that has a mouseover/out rollover effect. I also have it pop up a new window with a "recommend this page to a friend" script. I can't figure out why the image wont show up, it's like it's invisible. 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. 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. 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. 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. 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 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 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. 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. 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 My index.html file is like this (www.omegaintertrade.ro) Quote: <html> <head> <title>Omega Intertrade Test Site</title> <link rel='stylesheet' rev='stylesheet' href='global.css'type='text/css' media='screen' charset='utf-8' /> </head> <body> <div id='wrapper'> <div id='wrapper2'> <div id='header'><img src="logo.jpg" height = 120 border="0" hspace="25" > </div> <div id='leftcolumn'> <ul> <li><a href="index.html">Home</a></li> <li><a href="mb.htm">About Me</a></li> <li><a href="mb.htm">Products </a></li> <li><a href="mb.htm">Contact</a></li> </ul> </div> <div id='rightcolumn'><div class= "bheader">This column is intentionally blank!</div> </div> <div id='bodytext'> <div class= "bheader">Home</div> Main text area <br> stay with omega to see the further developments</div> <div id='footer'>Footer</div> </div> </div> <body> </html> As you may see it is consist of header footer and 3 columns in the middle. While visitors navigate through menus only bodytext content will change. For example after registering the site, a small message will appear like 'thank you for registering' on bodytext. How should i place that message in the page(on "bodycontent")? Should i create another html document exact like index.html except changing the content of the "bodycontent" section. This idiot solution comes to my mind Is there another short and easy solution? I have been a hobbyist web developer for a lil bit but I have been looking for this info but I dont think my search terms are corrent... What I want to do is make a page that has the side menu, Header, Footer. Stay the same but have links and pages that would change inside the content part of the site. Embarrassingly what I have been doing is making copies of the index file for each page . I Know there must be a better way. If someone could shed some light on my problem. Bradley |