HTML - Elements Not Floating Correctly
Hi everyone
I've developed a website and now when it got ready someone discovered that the sidebar isn't floating correctly in his mozilla firefox. It works fine in my firefox and IE and in his IE, but not in his FF. So I have a screenie how it looks like when it's wrong and when it's right: Right: Wrong: The source is at www.latvala.com Please help me Similar TutorialsHello everyone, I'm new here. I hope someone will help me with my problem. You can see it he http://kahoe.monline.dk/portfolie2/index.php EDIT: Problem 1 solved. Problem 1 is in the grey menu to the right. I've used php include_once to insert four div elements (with images and a little text), but they position themselves in a strange way. It's supposed to be a collumn. You can see the html file with the four elements he http://kahoe.monline.dk/portfolie2/globalmenu.html I should probably say that I've used javascript to make a hover effect with the images. (Do I need to include code in this post, or do you guys usually view CSS and HTML in the browser?) Problem 2 is with IE. I have IE 8 installed, so I don't know about other versions, but this one can't find the images on my website. It works fine in Firefox. What's wrong? Problem 3 is with the div element at the top of the page, the one which contains the text "Denne hjemmeside ses bedst med Firefox. Download Firefox her. " I can't get it to sit at the very top of the page. I've used body { margin: 0; padding: 0; } in the stylesheet already, but it's not enough apparently... How do I make element's change their height automatically depending on whether they have anything contained within them? My page background is a div's bg image but the div hasn't expanded to the size of the contained elements. The div's name is nicola-bg Here is the site I have the same problem too with #image-section. That div is styled to have large borders but the borders don't extend to the height of the div's containing elements. Prevous title: (div in div top:0; left:0; = top corner of first div, not page...) Ok, here's the 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>DIV DIV</title> <style type="text/css"> <!-- #apDiv1 {position:absolute;top:0;left:0;width:150px;height:150px;z-index:0;background-color:#00F;} #apDiv2 {position:absolute;top:100px;left:100px;width:200px;height:200px;z-index:1;background-color:#F00;} --> </style> </head> <body> <div id="apDiv1"></div> <div id="apDiv2"> </div> </body> </html> Which produces: However, the "problem" is that i would like that result with this variation on the code: HTML Code: <div id="apDiv2"> <div id="apDiv1"></div> </div> But that "unfortunately" returns this result: Which was great when I first did it, (i always thought top:0; left:0; would put a div in the top corner of the page regardless of where it is within the code... so when i tried it in my last project and it used the top corner of the containing div as 0,0 that was exactly what i needed) but in my current project, I really need div1 to go to the top corner of the page, not div2, but still reside inside of div2... is this possible? Hi everyone, Me again I'm afraid. Hope you had a good Christmas and New Year. I have a question regarding the following page: http://www.dynamic-xchange.com/resources.php I am trying to update it as I have done with the others (http://www.dynamic-xchange.com/index.php) and implement XHTML and CSS but I am having problems floating the divs correctly to get the desired effect as in the page given above. Any help of advice would be very welcome as I am tearing my hair out. Warm regards, Simon Hey, Ive seen this done a few times and i was wondering if aqnyone knoew how hard it is or how to achieve it. When the user clicks on a button i want either an image or text to appear next to it. Im sorry i cant find any examples but i have seen it done in places. Thanks, Ben Hi all, Sure glad I found this site!, I would like to ask for some advice please guys I have a portal that uses a portal stylesheet, the header is a .png image and needs to be 100% width, this loads from a Content Web File Manager, it carries a logo on the left and some corperate colour bands, it appears on every page of the portal, the right side is blank apart from the picture of a search box ( it shipped with the png I will be getting rid of this using PSP) I have created a <div> content </div> and I want this to appear to the right and in front of the header in place of this search box The <div> loads fine on templates (the dynamic content of the portal these are templates that the site use) so I know this works fine, now i want to make it appear on the header itself in place of the picture of the search box that I have erased This is where I am getting stuck - I do want it to be a permanent feature on the header and to the right, what do I need to use in the html code before and after the <div> content </div> ? All help will be greatly appreciated John Hello, I've came here because I am really stuck on this one problem... I can't float another DIV right so it's beside another DIV. ( http://www.lentonent.com ) Please could you fix this source code so one div is on the left and one is on the right and they both have a background of middle.png: Code: <html> <head> <style> #middle { width: 900px; background: url(images/middle.png) repeat-y; } #middle-left { width: 580px; padding: 25px; border: 1px solid #000; } #middle-right { width: 200px; padding: 25px; border: 1px solid #000; float: right; } </style> </head> <body> <div id="middle"> <div id="middle-left"> <h1>LEFT SIDE</h1> <p>This text should be on the left hand side. I'm just going to write a little crap now to make this paragraph really long and cool just like a frog standing on a spoon. Yes very random indeed but that's not what the bus shelter said.</p> <h1>LEFT SIDE</h1> <p>This text should be on the left hand side. I'm just going to write a little crap now to make this paragraph really long and cool just like a frog standing on a spoon. Yes very random indeed but that's not what the bus shelter said.</p> </div> <div id="middle-right"> <h1>Test</h1> <p>This is a test.</p> </div> </div> </body> </html> Thankyou very much for your help! Hello, I am trying to create a web page, and, currently, there is text at the top, and text at the bottom displaying copyright information and useful links. I am aiming to have this page fit into one page, without the need for scrolling, with an iframe in the middle. (So the user is not taken away from the page to complete the task). However, I have the text at the top, the iframe set to 78%, and useful links at the bottom. It works in most browsers without needing to scroll, however, when you use the page in IE, you need to scroll to see the very last bit. Is there a way, I could "float" a section at the bottom of the page, so it doesn't disappear? can anybody please help with this html document, i need to have all the picturecs in the right places.. i cant seen to figure it out, i will only take a minut for someone who know what to do ! http://peecee.dk/upload/view/174763 How do I make text appear above lowercase characters? http://tinypic.com/r/1t4igj/5 How can I make a floating social media sidebar like this one? okay guys so i made a theme and here's the out come ( i wont make it appear because its so big ) http://i.imgur.com/LyM41.png but i want to put an i frame on the middle part like this http://i.imgur.com/Fw6fP.png w/ transparency but still the image is still there so it will look like this http://i.imgur.com/CUP1k.png can any one help me with the code? http://i.imgur.com/t9zrr.png Hi, How can I get my jquery gallery to appear in the center and the columns on the side to auto fit around it? The gallery is currently hanging over the right column. http://elitedonuts.com/float3.html THX! i have a iframe code im using to run a scrolling text, im wondering if i can get the iframe to float on the right side of the screen... i tried adding stye="float: right but it didnt work heres the code im using below and you can see a preview of the outcome at http://www.freewebs.com/fallingrain11/test2.htm document.write('<iframe id="datamain" src="'+iframesrc+'" width="165px" height="215px" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="1" scrolling="no"; style="float: right></iframe>') EDIT: Problem Solved. Thank You. Hey all, new guy here, working on a page for my work place. I work in a call center and all our support documentation we upload to a web-site so its quickly and easily accessible. My predecessor had a very basic setup designed in MS Word but the site has grown way too big for Word now. Its my baby now and I have been designing it over the past couple months as I have had time, complete re-write yah! in any case, after getting the design and setup down, I moved on to the coding using a mix of Dreamweaver and straight up HTML(how I learned in college). Built a frames version and hated it, so after reviewing all the options I opted to go with SSI for the menu. I built the menu, its simply 2 tables, 1 runs the full width along the top, the other floats left. Here is a screen-cap - company logo and other info blocked off. OK, everything is fine, so far, but the main/index page will have to have a lot of links. We have 1 page for every app. IE. Groupwise as shown. The apps are ordered alphabetically and I will need 2 or 3 columns and will need to be able to jump in and add an app in the middle of the list quick and easy. Simple answer: tables. Not so simple though.... most people resize the IE window down so they can keep working on one thing and read off the page... When I tested resizing the window this happens... *again, info removed* Before a scroll-bar appears, the tables drop down BELOW the side menu table from the SSI file... I have tried everything I can think of to fix this and just cannot get it to work... I tried playing with the side menu table height, (currently set to 100% to fill up remainder of page) and have even tried setting the top menu to a set width so that a scroll bar will appear if you do anything but full screen, even then when too small the tables jump down to below the side menu. I even split the side and top menu to 2 seperate SSI files and it does the same thing(and has a big space between the 2)... Plain text will jump down as well, but only after you make the window too narrow to have a single character next to the menu. Any help would be greatly appreciated. Suggestions on what to try? where to look for an answer? or if I am going about this all wrong.... what I should be trying... Thanks in advance! -Tim hi i am having a real problem with some divs. i have a div which has a transparent background and i wanted the text on it not to be transparent so i made a new div and put it on top of it by making its position absolute. this works fine my problem is when i try to create a new div which is meant to be next to my original div it either appears on top of the original or underneath it even though their is plenty of room next to it. my code is he HTML Code: <head> <style type="text/css"> body{ background-image:url(135_o.jpg); padding:40px 40px 40px 40px; text-align:center; } h3{ color:#FFF; } #ontop{ position:absolute; top:48px; text-decoration:underline; width:195px; height:395px; border:5px solid black; text-align:center; } #boxDiv{ width:200px; height:400px; font-family:Arial; font-size:16px; background-color:#999; opacity:0.3; } #middlediv{ width:200px; height:400px; background-color:#ff9900; } #container{ width:900px; height:500px; border:2px dashed white; } </style> </head> <body> <div id="container"> <div id="ontop"> <h3>Accommodation</h3> </div> <div id="boxDiv"> </div> <div id="middlediv"> </div> </div> </body> </html> i have also included a screen of what is happening: any help would be great thanks. Hi, I'm doing a website and for my link i would like drop-down menus at the top but i want it to stay at the top when you scroll. Can anybody point me to these. I have no idea how to do drop-down menus that look good. Take a look at http://www.runehq.com/ and look at the menus at the top. I would like some like that. Help would be great. Thanks. ToshNeox Hey everyone. I'm working on a Wordpress template and have a question. I have a div #header and the corresponding CSS defines a background image. All good. What I want to do is put some image/links (i.e. a picture that says HOME that is hyperlinked to the hope page) inside this div. Using simple <a> tags I can achieve this: Code: <a href="www.google.com"><img scr="mypicture"></a> . This naturally puts my picture-link at the top left of the header div. I want this picture-link to be moved to the right maybe 25 pixels, moved down 20 pixels, etc. How can I acheive this? I tried replacing the <a href="www.google.com"><img src="mypicture"></a> with this: Code: <div style=”top: 20px; right: 25px; position: fixed;”><a href=”www.google.com”><img style=”border:0;” src=”mypicture” alt=”home” width=”140″ height=”40″ /></div> I found that on Google and thought it might work, but I have no success. Do I need to use CSS for this? And how exactly would I do that? Can anybody give me a good detailed explanation on how I can go about doing what I want? Help would really be appreciated! Thanks! Hello please see http://www.view-agency.com/view/Repr...x?Id=243&Cat=2 in all the RepresentedEng.aspx The .main_wrap class floats to the right, although it's inside a class that has same width and margin auto ... anyone ? ? What's even wierder is that on http://www.view-agency.com/view/Cate...Eng.aspx?cat=2 for instance, there is no floating problem although it's supposed to work on same css.... Comment - Don't bother explaning to me that it's not valid and code isn't 100% right because I didn't make it, and it ain't possible to make the site all over. I'm sure there's a way to fix this tiny problem.. Thanks !!!!! |