HTML - Content Alignment Problem
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 Similar TutorialsI 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? Hello, im trying to make a webpage and figured invisible tables would be a good way to structurise the page, ive ran into a problem tho as in the cell content alignment is wrong. heres what im trying to achieve: Code: ____________________________________________ | navigation |text starts from up here | | navigation | | | navigation | | | navigation | | |____________|_____________________________| but while the navigation bar is always the same height the text cell is sometimes taller sometimes shorter thus i get situations where the small amount of text starts from the middle of the cell instead of top as i want it to and when there is alot of text the navigation bar moves to the middle of the streched out cell heres the html im using right now Code: <table> <tr> <td> <a href=blah blah>link</a><br> <a href=blah blah>link</a><br> etc </td> <td> here is the text </td> </tr> </table> please help Hi all, I'm working on a personal website and I'm stuck on this one little piece of coding. I'm desperate, no one will help me one the forums! Here's my code: HTML: Code: <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>owr // home</title> <link href="css/style.css" rel="stylesheet" type="text/css"> </head> <body> <span class="text"><strong>owr</strong> // home</span> <p class="text"><img src="images/block.png" width="20" height="18"></p> <p align=left><a href="index2.html"><img src="images/home.png" width="20" height="57" alt="Home"></a></p><p align=left><a href="music.html"><img src="images/music.png" width="20" height="50" alt="Music"></a></p> <p align=left><a href="pics.html"><img src="images/pics.png" width="20" height="35" alt="Pictures"></a></p> <p align=left><a href="vids.html"><img src="images/vids.png" width="20" height="35" alt="Videos"></a></p> <p align=left><a href="links.html"><img src="images/links.png" width="20" height="50" alt="Music"></a></p> <p align=left><a href="projects.html"><img src="images/projects.png" width="25" height="50" alt="Projects"></a></p> </body> </html> CSS: Code: @charset "utf-8"; .text { font-family: MankSans-medium; } .content { font-family:MankSans-medium; font-size:14px; } .content2 { font-family:MankSans-medium; font-size:16px; } A:link { text-decoration:none; color:#000 } A:active { text-decoration:none; color:#444 } A:hover { text-decoration:none; color:#999; } Images: http://yfrog.com/bfblockfp http://yfrog.com/06homecsp http://yfrog.com/6glinkscp http://yfrog.com/0imusiclkp http://yfrog.com/2opicsdnp http://yfrog.com/63projectsp http://yfrog.com/mzvidsp I need to put content to the right of the image links, but I'm not sure how to separate the links from the content so I don't end up writing text under the pictures. I think I'm being clear but if you need me to expound, please let me know. But I really need some help with this. Thanks a bunch! Matt I am practicing code from a file and I am having issues. Specifically, I the geogebra applet is supposed to be framed in the right side, where the "buttons" are the left. I can't figure out why the file is not on the right side in its own section. Any suggestions? I am attaching the code using a word document... I highlighted what I feel is the problem. Nick I've been putting my layout into html from photoshop and finally finished, thing is I was using Firefox to view it as I went along. Now when I view it in Internet Explorer, there is this small unexplained space on the right side of my header image that is screwing up the page, plus the table that I have the navigations links on the top left has way more spacing between rows than it does on Firefox. Here's the layout: http://www.ff12guide.com/ the two problems a 1) the empty space to the right of 'header_red.jpg' and 'top-2-shadow.jpg' at the top of the page 2) the links in the 'sections' area at the top-left (characters, combat, etc.) is much more spaced out than it is in Firefox, and does not look right I absolutely cannot figure out how to fix this and it's driving me nuts, anyone have an idea? On my website, www.JKRfan.com , the alignment on the layout is a little bit off and I can't figure out why. The problem with the alignment also changes from page to page. Will somebody please help? Thanks, Kristen Hi, I've finally created a 2 level CSS menu and I've positioned a DIV layer below it for the content. However, I would like to know how to shift the content DIV layer up, closer to the menu (horizontal one). Or is my coding for the menu causing a problem? Here's my site btw: Click I'm really stuck here. This has worked in the past, but not it seems to not be working. It must be a really easy fix. HTML Code: <body style="font-family:Georgia;"> <div align="center"> <div id="content"> Lorem ipsum... </div> </div> </body> I want the "content" field to be center aligned, but it is still sitting there on the left. How do I fix this? Thanks! i have uploaded my website. i m facing a problem. my website appears differently in different computers. its like changing alignment, table spreading so so. i used table to develop the site. how can i fix this problem. Can anyone help me? Hi am trying to get multiple tables with different number of columns to be aligned properly. I'd expect the columns width the same width of both tables to be align properly. But they are not, as you can see on the attached picture at the bottom of the page. The first two columns look good, but the more columns I add the more shrewd up the result gets. Does anybody know how to get them properly aligned ? Of course it works if the width is given in px not in %, but that is not what I want to do. Using a single table and colspan is also not an option, as this is a simplified example of the problem. Thanx in advance. HTML Code: <html> <body> <style type="text/css"> .width100pro { width: 100%; } .c1-6 { width: 15%; } .c1-12 { width: 5%; } .t1 { width: 35%; } .t2 { width: 65%; } .b25 { width: 25px; } .b100 { width: 100px; } </style> <table class="width100pro"> <tr> <td class="c1-12"><input value="TestSMall" class="b25"></td> <td class="c1-6"><input value="TestBig" class="b100"></td> <td class="c1-12"><input value="TestSMall" class="b25"></td> <td class="c1-6"><input value="TestBig" class="b100"></td> <td class="c1-12"><input value="TestSMall" class="b25"></td> <td class="c1-6"><input value="TestBig" class="b100"></td> <td class="c1-12"><input value="TestSMall" class="b25"></td> <td><input value="TestBig" class="b100"></td> </tr> </table> <table class="width100pro"> <tr> <td class="c1-12"><input value="TestSMall" class="b25"></td> <td class="c1-6"><input value="TestBig" class="b100"></td> <td class="c1-12"><input value="TestSMall" class="b25"></td> <td class="c1-6"><input value="TestBig" class="b100"></td> <td class="c1-12"><input value="TestSMall" class="b25"></td> <td><input value="TestBig" class="b100"></td> </tr> </table> </body> </html> OK well This workse perfectly with a .html document, but when I use .php it all goes bad, http://rapid-hook.com/script-2/index.php The arrows ar suppose to be aligned with each other, but theres a gap between the table, for the bottom only, not sure how to fix this. I am hoping that someone may have a solution for me - in one of my table columns I have 3 images (logos that link to sites) and I have set them with a vertical top alignment - so that when the page goes long - the logos stay at the top - this works perfectly in all browsers, except (of course) IE... would anyone know how to fix this? My site can be viewed at http://bebywebtest.9k.com/history.html ... if you click open the collapsible menus - you can see the logos - start to center themselves down the page - instead of staying at the top... <br /> </td> <td width="5" rowspan="3"> </td> <td width="380" height="179" bordercolor="#000066" bgcolor="#FFFFFF"><div align="center"><a href="http://www.israelbonds.ca"><img src="Images/header-march-2006.gif" alt="bonds" name="israelbonds" width="256" height="100" border="0" valign="top" id="israelbonds" /></a></div></td> </tr> SO - if anyone has any suggestions on how to remedy this fiasco - I would be most grateful! Thanks. Hi All, I am creating a new website using html frames (I know, using the html frames are a bad idea but my client wants this). The website have a header, content panel and footer. Html frameset have 1px border. I need frames align centered in the webpage. could somebody help me to short it out. Frameset code is here <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>vvaves</title> </head> <frameset border="1" bordercolor="#CCCCCC" frameborder="0" rows="330,800,150" style="height:1180px"> <frame src="top_panel.html" frameborder="0" scrolling="no" noresize="noresize" /> <frame src="content_panel.html" frameborder="0" scrolling="no" noresize="noresize" /> <frame src="bottom_panel.html" frameborder="0" scrolling="no" noresize="noresize" /> </frameset><noframes></noframes> <body> <div align="center"></div> </body> </html> Please help me. Thanks in advance. Sunil Saini I am having trouble aligning a photo dead-center in a div. Here's a simple breakdown to avoid confusion... <div class="div1"> <div class = "div2"><img src="image.jpg"></div> </div> What I am trying to do is get that image right in the middle of div 1, both vertically and horizontally. Just to give a bit more of an illustration, for argument's sake, let's go by a standard 800px wide and 600px high for div1. The image size could be 400px by 300px. Div2 could be 75% W&H of Div1. I've tried everything I know using CSS and HTML, but I am missing something. All help is appreciated. Thanks, Jake Hi, I can usually troubleshoot basic html issues, but don't have much knowledge of frames. The page design is a basic 2-frame horizontal format with body content files that swap in and out from a header menu bar. Both header and body files are centered, and should be visually seamless. The problem is when the main body frame is set to scrolling="yes", the scroll bar in the browser window offsets the center of the frame, and the two frames appear out of alignment. If the main body frame is set to scrolling="no" then they line up properly (but obviously cannot scroll down through the page). You can view the issue he http://www.sequentz.com/menutest/index.htm I would greatly appreciate some help sorting this out, so that the two files align seamlessly and the bottom file can scroll. Thank you. Hello there, I am in serious need of help. I am working on a site where I could update the navbar at any time and not have to change the code on numerous pages. After some reading, I concluded that the use of an SSI would be a suitable solution. With that being said, my headache ensues. I have developed an outline in dreamweaver for my website, and have created a div where the ssi will be placed. The navbar was created in Fireworks. In IE, i can get the menu to appear where I want it, which is below the flash image below the header, however, when I run the mouse over the dropdown, the drop down appears some 50 pixels above the navbar. I am thinking that this might be a css problem. In Firefox, the div tag appears off to the left and when the mouseover is done, the dropdown appears in the same place as they have in IE. In both instances, the dropdown menu is in line with the image used in the navbar. I would really appreciate any help someone could offer. If someone could send me a working solution, I would be even more grateful. I think my eyes are tired of viewing the code. the site can be viewed at the following url: http://www.prestigeinteractive.com/wmems2/ I would greatly appreciate any help you can offer. Thanks, Greg ps. if you would like the source files, email me at gwhite@prestigeinteractive.com Hi, I am having dramas with a template and it lining up with the Backgroung Image. The template has the same background image as the page background but its like a mesh effect so its a real pain in the butt to line up. And its not working because different screen resolutions and browser widths move the template on the page background. See he http://www.superiorshine.com.au/new If you load the page and the make your browser width smaller you will see the template move along the background image this is why it never lines up cause its floating all over it. Is there anyway i can stop this? I have spent a total of 7 hours fiddling with the background and i still cant get it to work. My last resort is to go into the .PSD and make the website width and height bigger then peoples resolution and save for web and make the bits outside the template (background image) a picture in a cell so the page doesnt see images and expands the scroll bars. Here is the template overlapping: www.superiorshine.com.au/sample/overlap.jpg Any other idea's as this is really getting to me LOL.. Cheers Goodday, This is a bit of a follow-up on my previous question, but in some ways, it's also a seperate problem: Have a look at this. In the first table, the height is determined by 'height="200"' and the position of the 'Text' is 24 pixels above the bottom, exactly what I wanted. But now in the second table: Here the height is determined by the content of the first row and the 'Text' part's height is way to big. What happened? Why isn't it showing a table with the height I have set? What should I do to tell a cell it's height, starting from the bottom of the table? Thank you for your help, Laurens, Hi, There may be an easy solution but ive spent over 3 hours trying to correct this now. Basically i have 3 pages, each of which i 'saved as' to ensure the basic layout was identical. When the pages are aligned left they are all perfectly aligned, however as soon as i align them centrally, the heating and plumbing pages, for some reason indent themseleves slightly right compared to the bathrooms page. This is so frustrating. Can anyone see why and offer a solution to get them all aligned perfectly central? Thanks!! P.S. I think i may have wittled this down to a problem with the main content area, it seems when i apply the css h2 tag or remove the image it suddenly jumps. I have got them all aligned perfectly centrally before with no css in the main content area. any ideas? |