HTML - Trouble With Divs Displaying Correctly
Hey,
I've tried to start coding a page with XHTML and CSS using divs to align everything, but I'm having all kinds of trouble getting stuff to align and then getting it to align in more than one browser. Here is the page and CSS: http://dzapp.com/ http://dzapp.com/DZStyle-V1.css Any kind of advice would be greatly appreciated. Thanks! Similar TutorialsI'm new to HTML/CSS, and I thought I managed to get my website just right... until i tested it in IE. (I now understand why IE is the bane of our existence!) All versions of IE (and Opera, for that matter) make my divs display lower than I intended. My webpage is comprised of many divs, two of which are my main problem. I have two divs serving as the main content (one is an intro to the site, one is a calendar). I would like these two divs to be side by side, at the same height, roughly 10ish pixels below my navigation bar... this is easily achieved in firefox and safari, BUT in IE they get weirdly pushed down on the page. Also, my title div has a habit of being shrunk in height from 175 pixels to around 25 in some versions of IE. This is causing much headbanging! In summary, I need suggestions on how to position my divs. Right now I am using absolute positioning for everything, but I have also tried relative positioning and using floats; however, no matter what I do, I end up with some other problem that I cannot solve, and these are too numerous to go into detail here. If you can help me, a million thanks! If you want to look at my code, the website is http://www.studentgroups.ucla.edu/tbsek THANK YOU IN ADVANCE for any ideas you have! Hello. I have created a website: www.launchtechusa.com It looks fine when you view it through mozilla or safari, but it gets distorted when you view it through internet explorer. Any reasons why this may be happening? Thanks for any pointers you can give! Guys, i am in a real bind here. I recently redesigned my website & gave it a fresh look. Well apparently that new look has come with a cost! My homepage doesn't display correctly in IE6 or IE7. I am getting a lot of complaints about it & I have no clue how to fix it. I added a script to inform users that they were using an older browser that was outdated but a lot of my users cannot update their browsers because they are on work computers & what not. Can someone please help me fix this mess. My homepage URL is: http://www.biglake411.com/ The site displays correctly using firefox & IE8. The problem is with IE6 & IE7. Here are screen shots of each: Thanks in advance. Here is the link: http://www.averytrips.com/socal.html I've got a TR with a background image applied to it. The background image is supposed to look like this: http://www.averytrips.com/trbg.png Clearly the TDs are messing it up, but I can't for the life of me figure out why. Hello to all, as a first time user of this site. I use Namo WebEditor 8 and have just spent over 3 hours trying various things to get my navigation buttons to work. Within the edit function (non html) everything is ok display wise. On full preview i get extra blank lines. I have around 9 pages (as headers), one works and eight that don't. Below i have included the full code for 2 of my pages. I am out of touch with reading html now, but i am simply trying to help a playgroup charity out so any help appreciated. OK, I've really been tearing my hair out with this one and now getting frustrated beyond beliief! LOL. I have as a bolt on within my phpBB2 (v2.0.22) forum a Mass email HTML MOD (uses a program called MICE). Now, my forum style is Aphrodite and I have successfully got this into a draft email yet when I go to preview the email, everything is set-out perfect. Once it gets sent to any email client, ie Hotmail, Yahoo mail, etc, etc, a lot of the style gets stripped making it all look very messy. Best way to explain this is by screenshots. The below is how it SHOULD look (small section of the email): And this is how it looks in email clients (same section): This is the header from the html file: 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 content="text/html; charset=ISO-8859-1" http-equiv="content-type" /> <title>screwball newsletter 1</title> <link rel="STYLESHEET" href="http://www.screwballscrabble.co.uk/forum/templates/ca_aphrodite/style.css" type="text/css" /> </head> <body> I'm hoping it's something that is easy to remedy as I've obviously overlooked something. Look forward to any responses. Thanks! Hi Maybe it's just on my computer, but my site's not coming up right in Firefox the last few days. It works fine in other browsers. Can anyone see a fault in my coding to explain why there is no info appearing in the "Tommo's Trivia" box? The site is at http://www.billygoatkaraoke.com.au Thanks for taking a look. Shaun Hi, first question as a new user so here goes... As part of a website I'm designing I'm trying to create a fairly simple layout with two DIVs, one for an image and one for text, like in the picture below: http://www.eastwood6.co.uk/layout.gif I'm having problems getting the second smaller DIV (the one with the text in) to stay to the right of the first smaller DIV (with the image). I have floated the first DIV to the left, but I found that the text wraps underneath the image when the text is longer than the image. I tried floating the second DIV to the left as well, and this worked fine in IE, but it causes problems in Firefox, namely that the entire second DIV is pushed below the first. I've been messing with this all morning and just cannot solve it, any help would be greatly appreciated! Here's the code I've been playing with: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> <title>Test</title> <style type="text/css"> * { padding: 0; margin: 0; } #one { width:50%; border: 1px solid black; } #two { float: left; border: 1px solid orange; } #three { width: 400px; } </style> </head> <body> <div id="one"> <div id="two">This is the left box</div> <div id="three">This is the right box. Now I just want to see what happens when I type so much text that it flows off the end. This is the right box. Now I just want to see what happens when I type so much text that it flows off the end. This is the right box. Now I just want to see what happens when I type so much text that it flows off the end.</div> </div> <div style="clear: both;"><p> </p></div> </body> </html> Thanks, Pete I've got two divs that I want to center, each within its own outer div. Here is my HTML: 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>Duyun</title> <link rel="stylesheet" type="text/css" href="assets/styles/styles.css" /> <script type="text/javascript" src="assets/scripts/swfobject.js"> </script> <script type="text/javascript"> swfobject.embedSWF ("assets/flash/eng_button_2.swf", "engLink", "257", "471", "9.0.0"); swfobject.embedSWF ("assets/flash/ch_button_2.swf", "chLink", "257", "471", "9.0.0"); </script> </head> <body> <div id="container"> <div id="homeTop"> </div> <div id="homeMain"> <div id="homeLeft"> <a href="english/index.html"> <div id="engLink"> <p>Alt content</p> </div></a> <p class="homeEnter">Enter English Site</p> </div> <div id="homeRight"> <a href="chinese/index.html"> <div id="chLink"> <p>Alt content</p> </div> </a> <p class="homeEnter">Enter Chinese Site</p> </div> </div> </div> </body> </html> and the CSS: Code: @charset "UTF-8"; /* CSS Document */ body { background-color: black; color: #c0c3c4; } #container { margin: 0 auto; width: 950px; } h1 { text-align: center; } /*************** Home **************/ #homeTop { height: 100px; background-color: red; } #homeMain { margin: auto; width: 800px; } #homeLeft { float:left; width: 400px; background-color:blue; } #homeRight { float: right; width: 400px; background-color: green; } engLink { margin: auto; width: 257px; height: 471px; } chLink { margin: auto; width: 257px; height: 471px; } .homeEnter { text-align: center; } /**************Bio - English**************/ #bioContainer{ margin: auto; width: 785px; } #bioPic { float: left; margin: 20px; } .bio { margin: 10px; font-family:Geneva, Arial, Helvetica, sans-serif; font-size: 13px; text-indent: 2em; } As you can see, for both the chLink and engLink divs, I have the margin: auto declaration, but currently, they both show up to the left extreme of their containing divs. Any ideas what's wrong here? Could the swfobject be causing problems? Thanks. I am a total newbie to this and so I have no idea what is going on. I downloaded a template from a wesite I forget which, but it looks great in IE, and Safari, however in Firefox, or Opera it is all screwed up. The site is www.ottersupport.com would somebody mind look at the code and let me know what i need to fix ? Thanks Hello, I'm new here and I hope here is the best place to ask for help. Recently i found a piece of code on the net that will allow me to watch online different pictures. I have 499 folders and sorted them as 01 02 03 04 05 06 07 08 09 11 12 13 14 15 .... 100.....150.....350...499 but in my ftp client everything is messed up(filezilla) after i upload them on my server when i want to watch them .. the list appears like this: after folder no.10 i have folder no.100 and after folder 199 i have folder no.20 .. and so on .. how could i fix them so that the numbering would be correct ? Well, this is the first CSS layout i've made, the site right now is EXACTLY how I want it to look, but I think somethings not right... if I fill up where it says "How about some links? " too far, the footer goes to the top of the page, and the "Welcome" ends up in the navigation menu Here is the link Hi All, I need help as fast as possible for a non profit which I have co-founded. I am a native linux/firefox user, one of the other members had told me that there is an issue in IE with our website but hadn't really told me how bad it was. I checked it out today and it is HORRIBLE. We are sending out a newsletter in the next week which will probably significantly increase traffic to our website so getting it solved is crucial. I can provide any code that I have worked on in order to find help. the website is www.cleaneducation.org the website works fine in Firefox in Windows/Linux and Mac but IE does not work. Please visit the site using firefox and IE to see what I mean. I'm in a bit of panic mode over this Thank you much Hi guys, I'm very new here - literally just searched the web for help on this problem which has been plaguing me for some time... I'll post the code below, but basically, the div_id centre_image, the body text and the right hand side graphics are correctly formatted just in the wrong place! I need them to be to the right hand side of the Left hand menu... I'm hoping I make sense!? There is CSS as well but not sure whether or not this is a CSS issue or html! I would be really greatful if someone could help me out. I'm fairly new to website design but am trying my best using various tutorials on the web and compile something half decent! Thanks in advance, Graham. 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>Double Glazing | Windows | Doors | Conservatories | Rooftrim</title> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="header"> <div id="email_header"><a href=" mailto: xxxx@zurichtitanium.com">xxxx@zurichtitanium.com</a></div> </div> <div id="blue_banner"> <h1>Double Glazing Worcester</h1> </div> <div class="cleaner"></div> <div id="menu_wrap"> <div id="tabs"> <ul> <li><a href="#">Home</a></li> <li><a href="#">Windows</a></li> <li><a href="#">Doors</a></li> <li><a href="#">Conservatories</a></li> <li><a href="#">Rooftrim</a></li> <li><a href="#">Get a Quote</a></li> </ul> </div> </div> <div id="holder"> <div id="lhs_menu_wrap"> <div id="windows_menu"> <ul> <li><a href="#">Sleek White</a></li> <li><a href="#">Woodgrain Collection</a></li> <li><a href="#">Specialist Finishes</a></li> <li><a href="#">Security</a></li> <li><a href="#">Energy Saving</a></li> <li><a href="#">Maintenance Free</a></li> <li><a href="#">The Logical Choice</a></li> </ul> </div></div> <div id="centre_image"> <div id="centre_LHS_pic"></div> <div id="centre_RHS_pic"></div> <div id="getquote_button"><a href="#">Get a Free Quote...</a></div> </div> <div id="RHS_Content"> <div id="rhs_window_offer">Double Glazed Windows...<div id="win_text1"><a href="#">Get Quote</a></div></div> <div id="rhs_cons_offer">Your New Conservatory...<div id="win_text2"><a href="#">Get Quote</a></div></div> <div id="rhs_trim_offer">Transform Your Roofline...<div id="win_text3"><a href="#">Get Quote</a></div></div> <div class="guarantee_logo"></div> </div> <div id="body_text"> If you are considering enhancing your home, you owe it to yourself to get a professional consultation. At Zurich Titanium we pride ourselves on giving you exactly what you want. Whether it be treating yourself and your home to new <h2>double glazing windows</h2>, <h2>doors</h2> or a <h2>conservatory</h2>, invite us to show you what we can do. We guarantee you won't be disappointed. <p>We offer a fully customisable suite of Home Improvement Products, tailor made for your home, to ensure you get what you want and need, and not wasting money on features you'll never use. With our own highly skilled installers, we are able to keep quality control in house, enabling us to give, as standard, the unrivalled <b>Zurich Titanium 10 Year Guarantee</b> on all work undertaken.</p> <p>Our bespoke quotation service, available totally free of charge, will allow you to design the windows or doors, conservatory or roofline, most suited to your home, give you an accurate assessment of the work involved, and of course an exact price.</p> <div id="body_footer"></div> </div> </div> <div id="footer">Zurich Titanium Home Enhancements Ltd, Registered in England and Wales xxxxxxxx. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.</div> </body> </html> And CSS to follow... It may be somewhat rough around the edges; different hints and tips put together from across the web! Thanks so far Michael... Hello all, Need help with the HR aka 'a Line' I cannot get it to do what I want. Im trying to put a bit of spacing underneath the first image, bit like the second one but it should be more.... Plus im trying to add space underneath the last image so it doesnt just stop... can anyone please help. www.chappo.co.uk/years_ahead on the 'Brand' page. or www.chappo.co.uk/years_ahead/brand.htm it displays differently in both browsers but either of them do what I really wont, just one or the other.... Hello everyone, I've recently started a website at Angel Fire and went with HTML coding all the way. The problem I have is getting my text in their correct positions! It's been frustrating so, and I've searched everywhere for proper coding. Everytime I try to center certain text in the middle of the webpage, it pushes left aligned text further down. Any advice, coding, that would keep the text in check? Thanks. Hi, I have made a website that is scalable, but the problem is that it is not showing correctly in Internet Explorer. It works fine in Firefox. (2.x) site: http://www.haaga-helia.fi/~a0500249/pohja/index.html I don't know where the bug is. I ran it with w3c validator and it was fault free. Something to do with the css file, but I don't know where. Help is appreciated. Sincerely, Juha www.lasrocasresort.com , IE and Firefox both render the page correctly . Safari will leave a blank line between the flash banner and the body of the page. Any suggestion ? Pakal |