HTML - Image Movement In Divs
Hi, this is my first post, and I am still learning HTML, so I hope some of you guru's out there can help me!
Basically I have a page that will become a template for many more. The design isn't very good but that's not my issue at the moment, I am purely concentrating on the functionality and making sure everything is in the right place when viewed on different browsers. So, everything seems to work across all browsers (even IE6) except the bottom half of the page! The logo and 'back' arrow that sit bottom right, seem to move about slightly in different browsers. In IE6 there is a massive gap between the boxes and the logo, but I can't see where the problem lies. I have used the 'absolute' tag because I can adjust the imagery and text pixel by pixel, is this a bad move? My file is attached: Thanks Jim Similar TutorialsHi I am quite new to web work. I have begun creating a personal website HERE, currently just the homepage finished. It works fine in Safari (MAC) but in firefox it parts seem to 'flicker' and change appearance. Do I need to add a css hack to resolve this? Does anyone know what I could be doing wrong? Thanks for any help Tom I'm quite new to HTML and have only just started using Div tags as oppose to large tables to produce websites, i only do this for fun and they don't go on the net. As for my problem, the div tag that contains the main content of the page has moved below the navigation bar and i want it to be sat to the right of it... Will you need the coding for the website? It looks like this.. Header Nav bar Main content Footer I want it to be like.. Header Nav bar | Main content Footer It had been like this, and i'm not sure why it changed.. Thanks in advance for any help. =] ~Josh. Hi, I have got a weird problem with a page I'm writing: whenever I zigzag between my tabs inside the page, each tab's content moves a little bit to the right. you can clearly see it, if you zigzag between the "Friends" tag and the "Mail" tag, and notice how the title of the content moves a little bit to the right each time... I'm attaching my two files. Does anyone has an explanation? Thanks I'm having a problem with the hover pseudo-class for my navigation bar links. Whenever I put the mouse over the link the link becomes bold. The problem is that when it's made bold it moves the other four items on the navigation bar about 10 pixles to the right or left. What's the best way to fix this problem so that the links can become bold and not move the surrounding links? Here is the code for that specific section. Thanks a lot! ( Is there a better way to make space than by using  ?) <head> <link rel="stylesheet" type="text/css" href="default.css"> <style> a:hover {font-weight: bold;} </style> </head> <body> <img src="images/title.jpg" /> <ul class="navigation"> <a href="index.htm">Home</a>   <a href="humor.htm">Humor</a>   <a href="family.htm">Family</a>   <a href="projects.htm">My Projects</a>   <a href="links.htm">My Links</a>   </ul> <hr /> --- here is the style sheet that goes with it. .navigation {text-align: center; } My goal is to create a website to display a yearbook. First I wanted to display the overall page, with imagemapping to enlarge any images on the page, whether it be a group photo, an indivdual photo...etc. Some pages could have 1 image, others could have 40 images, and not each page has the images in the same spot, so each page would require it's own image mapping. My question is how do I work around screen resolution? I would prefer to use divs and tables for % imaging, but if I do, I can't use an image map. Or is there a way to make an image map that is also based on %? The whole project will encompass about 70 pages of images. Thanks Hi all -- I'm having an interesting problem. I'm designing a web page that has a navigation banner (home - programs - schedule of events - contact us - downloads) that is made up of a .png for each page (i.e. home.png, programs.png, etc). My page is 1000px wide and all of the navigation banner's images add up to 1000px wide. I'm using JavaScript to create an onMouseOver and onMouseOut effect on each of the images. The problem that I'm having occurs when I tried to add a link (either by <A HREF= or using an image map). Whenever I add a link to the image, a small (3px) area of white space shows up to the right of the image. This shifts all of my other images 3px to the right (and 3 more for each link I add to subsequent images) thus making the total width of the navigation banner over 1000px and the last image gets shoved to a new line. I can find no way to get rid of this white space other than to remove the link from the image. There is no property on the page that adds any sort of padding, margins, or borders to images or links, so I can see no property that has to be changed. Help! How do I get rid of this white space but still keep the link on the image?? [I posted this question on the Adobe forum to no avail, below is a screencap I took of the issue I'm having] Thanks in advance! //kl PS - I am using both IE8 and Chrome to view this webpage. I've set all the margins/padding/borders to 0px. Here is my CSS and the part of the code that pertains to the navigation banner. CSS: Code: <style type="text/css"> <!-- body { font: 100% Verdana, Arial, Helvetica, sans-serif; background: #666666; margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */ padding: 0; text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */ color: #000000; background-image: url(images/blue.bg.png); background-repeat: repeat; background-color: #009; } .oneColFixCtr #container { width: 1000px; /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */ background: #FFFFFF; margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */ border: 0px solid #000000; text-align: left; /* this overrides the text-align: center on the body element. */ } .oneColFixCtr #mainContent { padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */ } body, td, th { color: #333; } #main_banner2 { margin: 0px; padding: 0px; height: auto; width: 1000px; } --> </style> </head> Nav Banner: NOTE:: below HAS to be all one paragraph because if i insert a carriage return in between images, it also adds the white space... Code: <body class="oneColFixCtr"> <!-- MAIN NAVIGATION BANNER --> <!--HOME--><img src="images/nav/home.png" alt="home" name="home" width="82" height="30" border="0" onMouseOver="document.images.home.src='images/nav/home_over.png'" onMouseOut ="document.images.home.src='images/nav/home.png'"/><!--PROGRAMS--><img src="images/nav/programs.png" width="111" height="30" border="0" name="programs" onMouseOver="document.images.programs.src='images/nav/programs_over.png'" onMouseOut ="document.images.programs.src='images/nav/programs.png'"/><!--SCHEDULE OF EVENTS--><img src="images/nav/scheduleofevents.png" width="189" height="30" border="0" name="scheduleofevents" onMouseOver="document.images.scheduleofevents.src='images/nav/scheduleofevents_ over.png'" onMouseOut ="document.images.scheduleofevents.src='images/nav/scheduleofevents.png'"/><!-- CONTACT US--><img src="images/nav/contactus.png" width="119" height="30" border="0" name="contactus" onMouseOver="document.images.contactus.src='images/nav/contactus_over.png'" onMouseOut ="document.images.contactus.src='images/nav/contactus.png'"/><!--DOWNLOADS--><i mg src="images/nav/downloads.png" width="267" height="30" border="0" name="downloads" onMouseOver="document.images.downloads.src='images/nav/downloads_over.png'" onMouseOut ="document.images.downloads.src='images/nav/downloads.png'"/><!--FACEBOOK--><im g src="images/nav/facebook.png" width="90" height="30" border="0" name="facebook" onMouseOver="document.images.facebook.src='images/nav/facebook_over.png'" onMouseOut ="document.images.facebook.src='images/nav/facebook.png'"/><!--TWITTER--><img src="images/nav/twitter.png" width="67" height="30" border="0" name="twitter" onMouseOver="document.images.twitter.src='images/nav/twitter_over.png'" onMouseOut ="document.images.twitter.src='images/nav/twitter.png'"/><!--BLOGGER--><img src="images/nav/blogger.png" width="75" height="30" border="0" name="blogger" onMouseOver="document.images.blogger.src='images/nav/blogger_over.png'" onMouseOut ="document.images.blogger.src='images/nav/blogger.png'"/><img src="images/home_banner.png" alt="home_border" width="1000" height="7" /><br /> Hello, I am using a div for my website. I would like all the content to load in the divs, I don't want to create a new page for each site.How can I do this? Also, for the portfolio,I would like the images to change when you click the arrow, but I don't want to use frames or have each image on a new page. Can I do this within the div? Thanks! http://heartless-ink.com/treegirl.html Hello, I've been dealing with this problem and it seems fairly simple but has got me scratching my head. The page works fine in Firefox (of course) but internet explorer draws this problem. There are gaps between the DIVS and I have tried messing with the margins and padding a bit but have had no luck. here is the page in Firefox: Here is the code in page. HTML Code: <div id="container"> <div id="head"><a href=""><img src="hd_1.png" border="0" /></a></div> <div id="ev_top"><img src="ev_top.png" /> </div> <div class="float"><img src="ev_l1.png" /> </div> <div class="ev1"> <div class="ev2">Dallas</div> <div><a href=""><img src="ev_dallas_tba.png" border="0" /></a></div> <div class="ev3"><div class="float"><img src="/bullet_blue.png" /></div> <div class="ev4"><a href="">May - TBA</a></div> <div class="ev5">| <a href=""> More...</a></div> </div> </div><div class="float"><img src="ev_gap1.png" /></div> <div class="ev1"> <div class="ev2">New York</div> <div><a href=""><img src="ev_ny.png" border="0" /></a></div> <div class="ev3"><div class="float"><img src="/bullet_blue.png" /></div> <div class="ev4"><a href="">04.29 - 87 Lounge</a></div> <div class="ev5">| <a href=""> More...</a></div> </div> </div> <div class="float"><img src="ev_gap2.png" /></div> <div class="ev1"> <div class="ev2">Store</div> <div><img src="ev_str.png" /></div> <div class="ev3"> <div class="float"><img src="bullet_yellow.png" /></div> <div class="ev4">Coming Soon</div> <div class="ev5">| <a href="#"> Updates...</a></div> </div> </div> <div class="float"><img src="ev_right.png" /></div> </div> <div id="ev_bot"><img src="ev_bot.png" /></div> <div class="float"><img src="ev_botr.png" /> </div> </div> <div id="blog_right"><img src="blog_rt_gap.png" /></div> <div id="blog_contain"> Style sheet: Code: body{ font-family:Arial, Helvetica, sans-serif; width:713px; background:#cfeae7 url(bg.png); margin:0 auto; height:100% } #container{height:100%; width:750px;} #head{text-align:center; padding-right:25px;} .float{float:left;} .ev1{float:left; width:211px; background:url(ev_box_bg.png); font-size:24px; text-align:center;} .ev2{float:left;text-align:left; text-indent:6px;color:#9ce4e4;padding-top:5px;height:100%;} .ev3{padding-left:5px;text-indent:3px; padding-top:10px; width:211px;} .ev4{float:left; font-size:12px;color:#b1e7e7; height:100%;} .ev5{text-align:right; font-size:12px; color:#a2e6e6; padding-right:15px;padding-bottom:9px;height:100%;} #ev_top{padding-left:6px; margin:0px; padding-top:0px;padding-bottom:0px;} #ev_bot{float:left; margin:0px; padding:0px;} Any ideas? Help would be appreciated! Thanks. Ok, I'm completely self taught, so don't be surprise if my html is a mess. I was told recently that I'm out of date in using tables and should be using divs, so in updating my website that's what I'm trying to do. The first one is that it doesn't display properly in IE. Can anyone tell me why, and how to rectify it? http://www.ratscallions.co.uk/Test/index.html There are other problems (as you'll be able to see), but I'd like to work that one out first. Thank you, Nim Okay, i have a problem with divs on my site i have 4 divs, the first one is the holder, he's around the other 3. Then there are 3 divs that have to be placed next to each other, but that isn't working! When i use float left or right it tottaly screwes up my page, does anyone know what i do wrong?? my code is: HTML Code: /********** Lay-out **********/ body{ margin:0; padding:0; background-color:black; font-family:Tahoma; } .houder{ background-color:white; width:982px; height:500px; margin-left:auto; margin-right:auto; } .header{ height:120px; width:980px; margin:0; padding:0; background-image:url(Afbeeldingen/header.jpg); } .headers{ background-image:url(Afbeeldingen/headr.jpg); background-repeat:repeat-x; height:21px; width:270px; margin-top:1px; font-family: Tahoma; font-size:11px; color:white; padding-left:10px; padding-top:7px; } a{ color:black; text-decoration:underline; font-size:11px; font-family:Tahoma; } .Contenthouder{ height:340px; width:980px; } .scheiding{ background-image:url(Afbeeldingen/scheiding.jpg); background-repeat:repeat-y; width:5px; height:340px; margin-left:280px; } /********** Menu **********/ .menu{ background-image:url(Afbeeldingen/menu.jpg); background-repeat:repeat-x; width:980px; height:14px; margin-top:1px; font-family: Tahoma; font-size:12px; padding-top:9px; padding-bottom:10px; } a.menu:link, a.menu:active, a.menu:visited{ color:white; text-decoration:none; padding-left:10px; padding-right:10px; } a.menu:hover{ background-image:none; color:red; text-decoration:none; background-color:white; } /********** inlog **********/ .inloghouder{ width:280px; margin-right:700px; font-size:12px; float:left; } .inlogtxt{ padding-left:20px; font-size:11px; } .inloginput{ border:0; background-color:lightgrey; font-size:12px; width:250px; height:18px; padding-top:4px; } .inlogknop{ background-image:url(Afbeeldingen/knop.jpg); font-size:11px; font-family: Tahoma; background-color:grey; border:0; color:white; font-weight: bold; height:20px; } /********** Text **********/ .texthouder{ width:500px; background-color:yellow; height:300px; float:right; } HTML Code: <!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="ne" lang="en"> <head> <title>Familie Voetbalspel</title> <link rel="stylesheet" type="text/css" href="Style.css" /> </head> <body> <div class="houder" align="center"> <div class="header" /></div> <div class="menu" align="left" valign="middle"> <a href="#" class="menu"><b>Home</b></a> <a href="#" class="menu"><b>Uitleg</b></a> <a href="#" class="menu"><b>Punten</b></a> <a href="#" class="menu"><b>Ronde scores</b></a> <a href="#" class="menu"><b>Klassement</b></a> <a href="#" class="menu"><b>Spelers</b></a> <span class="menurechts" style="margin-left:389px;"><a href="http://www.coachvanhetjaar.nl" class="menu"><b>Coach van het Jaar</b></a></span> </div> <div class="Contenthouder" align="left"> <div class="inloghouder"> <div class="headers"> <b>Inloggen bij het Familie Voetbalspel</b> </div> <div class="inlogtxt"> <br /> <b>Gebruikersnaam<br /><br /> <input type="text" name="gebruikersnaam" class="inloginput" /><br /><br /> Wachtwoord<br /><br /> <input type="password" name="wachtwoord" class="inloginput" /><br /><br /> <input type="submit" value="Inloggen" class="inlogknop"/><br /><br /> <a href="#">Wachtwoord vergeten?</a><br /><br /> <a href="#">Geen account?? Hier aanmaken!!</a> </div> </div> <div class="texthouder"> </div> <div class="scheiding"> </div> </div> </div> </body> </html> contenthouder is the holder, inloghouder de div on the left, scheiding the div in the middle and texthouder the div on the right Can anyone help me with this code to make the page fluid in all three browsers without showing spaces in between the sections? http://www.cpe.rutgers.edu/wetlands/certificate05.html Thanks in advance Could anyone explain to me how to put rounded corners on divs? Ive researched it a bit, but i want to be able to change the colours so i dont want to use image based if possible. found a way to do it but want more than one curved div but cant seem to be able t use different colours. I want to have one large rounded div on the webpage then some smaller ones within this one for nav menus and content etc, Have found some ideas but they dont work with IE. Hello. I have problem with IE 6.0. 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>Untitled Document</title> <!- Holly hack for 3 px --> <!--[if IE]> <style type="text/css"> #_left, #_right, #_center { zoom: 1;} </style> <![endif]--> <style type="text/css"> <!-- #_left { float: left; width: 200px; color: #900; } #_right { float: right; width: 200px; color: #00F; } #_center { float: left; width: 200px; color: #00F; } --> </style> </head> <body> <div id="_left">Polyvios left menu<br /> sdfdsfdsf<br />sdfdsfdsf<br />sdfdsfdsf<br />sdfdsfdsf</div> <div id="_right">Polyvios right menu<br />sdfdsfdsf<br />sdfdsfdsf<br />sdfdsfdsf<br />sdfdsfdsf<br />sdfdsfdsf<br />sdfdsfdsf</div> <div id="_center">ddd</div> </body> </html> The result of this code must be three in line menu. (the code is an example). But IE 6.0 can't understand divs with float. Any one who knows how I can fix it? Sorry for my English. Thank you. Hi, I'm new to this forum. I'm having a little problem. It's the first time I'm working with DIV containers. I want to place 4 containers one below the other with no spaces in-between. In Firefox it works fine but not in IE. Can this problem be fixed? /Patrick Hello! The divs work fine in Firefox, but adjust to the text in IE. How can I stop them adjusting? http://rkgrant.110mb.com/rkghome2.html Thank you for your help! I think this is a html question, though if it needs to be moved to CSS please let me know. Basically, I'm using divs for the first time. I've got the same rough layout for each page on the site, but in one of them I need to insert a table. When I insert the table it puts a great big gap in the div just above where the table starts. Why is it doing that? Can I stop it? How do I get around this? Help! Nim I am trying to make a new layout for my site, http://www.jkrfan.com/index2.php , and I want it to be like this site: http://james-fan.org/ in the way that they have the two different background colors (the white one for the inside area and then the orangey one for the outside). I am also trying to figure out how they made the border on the right go all the way to the bottom. Help is very appreciated =] Thanks! My site is http://www.jkrfan.com/index2.php and my CSS is at http://www.jkrfan.com/styletest.css So just draw on AP divs and maybe also a bit of tweaking, can you "get away" with this? Biggest problem i see is that IE and FF tend not to always format things exactly the same .... ALSO, if i want to line up say an input text box with a search button gif(25px x 24px) at the side of the input then this works in firefox, Note that this is an AP div. <div id="apDiv3"> <input type = "text" size = "26"/><img src = "images/search.gif" /> </div> #apDiv3 input{float:left;height:16px;padding:2px;} Gives this is FF, Whereas in IE there is a small gap between the right end of the input and the gif, and also the input field is smaller I have to say i don't really undertsand the css there, i got it form the web. Why is there a gap and why is it smaller? Hi Folks, I am pretty new to web page development. I want to layout a page as follows: a) Header fixed height, width 100% b) left column fixed width c) Main content variable dependent on screen resolution d) right column fixed width E) footer always visible at bottom of screen I have been experimenting with div's to do this and I am having problems getting things to line up the way I want. I know I could easily achieve this using a table but I have the impression that it's frowned upon to do it this way. So my questions a a) Is it considered bad practice to use a table to control the layout of a page ? b) If so why ? TIA, JC I would like four divs to be loaded, but for only one to show at a time. The firt one says welcome with a few pictures, and the other three appear when certain links are hovered over. Possible? |