CSS - First Post: Need Help With A Floating Div
Hey All:
This is my first post to this forum. Any and all assistance is greatly appreciated! I am having an issue with some floating div's. I'm sure it's as easy as moving the div to a different parent but, I'm having trouble figuring this one out. My site is pretty simple. Most of the div's are floating left. I have one div that is floating right. I want the right div to stretch or contract to the full height of the content. Most of my content fits into a 740px height. There are a few that are more (up to 1500px). So, I want to put 1500px worth of images in the right column but only show as much as needed to fit the content area (most of the time only 740px). Right now, the full height of the right div is showing. I would post a link but, I'm new to the forum and it isn't allowed. If there is a way around this, I am happy to provide a link. Thanks in advance for any responses! Jeff Similar TutorialsI currently have the following layout Code: <table> <tr> <td></td> <td></td> </tr> </table> how do i go about making the same layout but using CSS. Each <td> is 50% wide Hi, Can someone help me with why the following header bar doesn't work in Firefox? It just shows the very top of the bar with the two other divs inside of it. Code: <div class="cmsHeader"> <div style="float: left;">Page Name</div> <div style="float: right;"><a href="" title='Add Page'><img src='images/icons/file_(add)_16x16.gif' border='0' alt='Add Page'></a></div> </div> .cmsHeader{ background: #809096; padding: 5px; width: 98%; color: #FFFFFF; } .cmsHeader a{ color: #FFFFFF; text-decoration: none; } .cmsHeader a:hover{ text-decoration: underline; } hi, i am a total newbie with css and trying to create a floating divider. an example can be seen at www.payjunction.com. does anyone know a tutorial on how to create one? thanks for the help in advance Learning CSS and trying to emulate the following table: Code: |--------------------------------------| | Text 1 |----------------| | | Text 2 | Inner box text| | | Text 3 |----------------| | |--------------------------------------| I can get a nested div to work vertically but not horizontally. I'm trying: Code: div#container { float: left } div#title { float: right } <div id="container"> hello<br>hello <div id="title"> Text 1<br /> Text 2 </div> </div> Which is producing: Code: |--------------------------------------| | Hello | | Hello | | |----------------| | | | Text 1 | | | | Text 2 | | | |----------------| | |--------------------------------------| Perhaps a positioning thing which I don't understand yet? It's not homework so you don't have to do it for me, but rather you could just point to knowledge sources.... Tx! Hi Everyone, I've been doing modest CSS for a while now and feel like I have a good grasp of it, and generally find a way of doing what I want. But, this has always bugged me and I need to understand what is going on... I think it's a question of Floating. This is in reference to http://www.arabellamusic.co.uk I want the blog posts to be on the left, and some other content on the right. How is the best way to go about doing this? You can check my source, but this was my thinking: Code: HTML <div class='inner'> <div class='left'> BLOG PHP HERE </div> <div class='right'> SOME OTHER STUFF HERE </div> </div> And the CSS: .inner { width:788px; } .left { float:left; width:50%; } .right { float:left; width:50%; } If you grab my stylesheet and my source, you will see that I have a couple more things in there, but I don't think they could be affecting the rest (text-align etc...) So, am I doing this wrong? I have floated columns in other websites this way and it sometimes works, sometimes doesn't. Incidentally, once it would only work when I set 49% to each, I was assuming this was something to do with the box model I read about, but wasn't too sure. I will try not to play around with the site too much until I get a reply or two, but a few things may jump around as I try stuff! Thanks in advance... James I have 3 tables in a div. I have two of the tables one on top of the other. I wanted to place the third table to the left of the bottom table. So I placed the second table relative and left -50px. I placed the third with position absolute, top -70px and float right to achieve this layout. Is there a better way of doing this out of curiousity? I saw this appealing menu from a css contest page and i've studied the code over and over again but i can't seem to get the same effect as this person has done. He has created a menu that just floats while the screen is able to scroll up and down. the site is : http://contest.prestontalk.com/index/FluidFixed/0/4/1/ if anyone knows how this effect is done, let me know. thanks! I am at my wits end as I have tried and searched just about everywhere for some guidance. I'm currently changing my site to an entirely tableless markup. On the following page, I have an image floated right of my <ul> which is wrapped by a div with a dotted border on the top, right and bottom. When I float my image right, the bottom edge of my image runs below the bottom border of the div. This only happens in FF and NOT IE. Check out the following link: My problem Here is my xhtml markup: Code: <!-- Start Linear Template --> <div class="contain"> <img src="/images/linearthumb.png" class="templatethumb" alt="Linear Template" /> <p> Linear Template </p> <ul class="template"> <li><span class="rarr">→</span> Professional and sophisticated.</li> <li><span class="rarr">→</span> Drop-down navigation menu.</li> <li><span class="rarr">→</span> Information “boxed” for easy reading.</li> <li><span class="rarr">→</span> Background can be “watermarked” with <br /> your logo or any color you wish.</li> </ul> </div> <!-- End Linear Template --> And here is my css for the div and image (forgive the roughness of it): Code: div.contain { padding-right: 5px; margin-bottom: 10px; border-top: 2px white dotted; border-right: 2px white dotted; border-bottom: 2px white dotted; } img.templatethumb { float: right; width: 168px; height: 160px; border: 2px outset #808080; margin-top: 5px; margin-right: 100px; } Hello. I spoke with some css developers yesterday on IRC but they failed to fix the problem. They suggested me to ask here for help so I will. I am currently making a new homepage and this is my page; mg-s.org/newly/ I had to edit most of the .css because the page was "floating". Like, some people couldn't see everything and if we zoomed in or out then the page got messed up.. So here is the current progress: mg-s.org/newly/ which is messed up. It's supposed to look like this: pokit.org/get/?00e5090c7ab5a0972f325bb16608f6fb.jpg But as you can see it's not. Here is the style.css : pastebin.com/BPrfZuBd Here is the index.php : pastebin.com/BDQKcxCE I am not that familiar with css so I need help. I've already editing on the size in the .css like on "top" to fix the #panel so it goes futher up but it's not working. Same with the #rightmenu http://tonglebeak.com View it in FF, and the floating boxes correctly appear on top of the white div underneath of it. View it in IE, and the floating boxes push the white div below them. How can I get IE to render this the same as FF? Hi All I seem to have an issue with floating an element in IE6&7. All other browsers (including IE8) are fine. When using a right float element, IE7 seems to push the elements to the left of it below the right-floated element, instead of to the left where they are suppose to be. Is there a work-a-round and/or hack for this? Cheers! Russ Gah. Internet Explorer is doing mighty funky things with my webpage. http://www.maths.tcd.ie/~icecube The floating images in the main posts work fine from firefox, but in the IE that I checked them out on, there are just blank spaces where the images/comments/bored should be - but even then you can still right click on the space where the image should be to save it and stuff. Anyone have any help/suggestions? Ok. So after some one i don't know on a website i was reading told me i should replace my tables with CSS i decided to listen to them. Now the website's top bar should look like this: http://www.leeksoftware.co.uk And i decided to do each box as a DIV. BUT! I can't get them all in a line. I can get the yellow one to the right of the long one but then i cant get the rest in the line. So far the CSS is: Code: div.logo { height: 70px; width: 618px; background-color: #476cD9; float: left; } div.home { height: 70px; width: 100px; background-color: #E29942; margin-left: 619px; float: left; } div.soft { height: 70px; width: 100px; background-color: #CC3333; margin-left: 719px; } div.tuto { height: 70px; width: 100px; background-color: #006666; margin-left: 819px; } div.cont { height: 70px; width: 100px; background-color: #254D78; margin-left: 919px; } I tired adding float left to all of them but that made them go diagonal. Can any one help? Thanks Matt I use form field hints on my sign up page. I am trying to float it to right with the codes below but its not happening. .hint { float:right; display: none; position:absolute; width: 150px; border: 1px solid #aaaaaa; background: #d7d7d7; } www.pearl.ru/isdunyasi/signup.asp In IE, this will produce the look that I'm looking for. The image and a couple of details are provided inside of a blue box. In FF, they overlap eachother. Not the text, just the image. How can I adjust my CSS? Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Test</title> <style type="text/css"> <!-- .fieldset { border: #26a solid 1px; width: 85%; margin-bottom: 5px; padding: 10px; } --> </style> </head> <body> <div class="fieldset"> 1: dfas <br /> <hr /> <img src="../../imageApp/images/smallrear.JPG" width="160" height="120" border="0" align=left hspace="12"/> etwrThis is an edit </div> <div class="fieldset"> 2: <br /> <hr /> <img src="../../imageApp/images/small100_1737 (Small).JPG" width="89" height="120" border="0" align=right hspace="12"/> </div> </body> </html> Please view the attached image. I want it as; left arrow - gallery - right content all on same line. css Code: #content #gallery { float:left; width:100%; } #content #gallery .list { float:left; border: 1px solid black; background-color: #dfdfdf; } #content #gallery .list li img, #content #gallery .list li p { width: 200px; height: 150px; margin: 10px; } #content #gallery a.galleryprev, #content #gallery a.gallerynext { display: block; float: left; width: 28px; height: 150px; text-decoration: none; background: url("http://www.gmarwaha.com/image/imageNavLeft.gif") left 60px no-repeat; } #content #gallery a.gallerynext { background: url("http://www.gmarwaha.com/image/imageNavRight.gif") right 60px no-repeat; } #content #gallery a.gallerynext:hover { background-image: url("http://www.gmarwaha.com/image/imageNavRightHover.gif"); } #content #gallery a.galleryprev:hover { background-image: url("http://www.gmarwaha.com/image/imageNavLeftHover.gif"); } #content #gallery a:hover, #content #gallery a:active { border: none; outline: none; } html Code: <div id="gallery"> <a href="#" class="galleryprev"> </a> <div class="list"> <ul> <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/1.jpg" alt="" width="200" height="150" /></li> <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/2.jpg" alt="" width="200" height="150" /></li> <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/3.jpg" alt="" width="200" height="150" /></li> <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/4.jpg" alt="" width="200" height="150" /></li> <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/5.jpg" alt="" width="200" height="150" /></li> <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/6.jpg" alt="" width="200" height="150" /></li> <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/7.jpg" alt="" width="200" height="150" /></li> <li><img src="http://www.gmarwaha.com/jquery/jcarousellite/image/8.jpg" alt="" width="200" height="150" /></li> </ul> </div> <a href="#" class="gallerynext"> </a> </div> I have a DIV element in a menu system that pops up when you hover over the parent menu. Everything in the menu works fine, however I need to embeed the navigation including the menu into a frame where the menu sits flush with the bottom of the frame it's in and when you mouse over the parent element the DIV that pops up is hidden by the frame below it. Like so: --- frame 1 ------ <content> <menu> --- frame 2 ------ <main content> ... ... ------------------ Is there anyway with CSS to tell the DIV to float above the bottom frame? Hello, I created a site with floating frames and it looks good in IE6 and FF/Mozilla. But I have one problem: I use in my dynamic layout an ID more then once (thats not OK according w3 validation) I tried to do something with pseudo classes but this works not really goed. My "uni" thumb box is used on two diff. pages The skyscraper: http://www.all4yourwebsite.com/ and the result/search page: http://www.all4yourwebsite.com/search.php I know there is a solution, but because the tumbbox have to be much flexible the solution must be simple as the current (wrong) solution. Anyone an idea? i am trying to make a menu so it goes all the way to the right of the screen in my header. I have an image to the left. I want the menu always to be at the right no matter what the user does to the screen. I have gotten the effect that i want but i had to use tables. I want to avoid using tables. Here is the link to the webpage of the desired effect using tables: http://skonline.org/courses//support-courses/glenn/jana2-diffmenu.htm I have attached the css and copy and pasted the parts of importance div#header { margin-bottom: 0px; padding: 2px; background-color: white; background-image: url(airplane.gif); position: relative; } #header div#rightnav { position: absolute; right: 0; top: 0; width: 232px; } .header-title { background: transparent; padding-left: 7px; color: rgb(68, 34, 0); vertical-align: middle; font-weight: bold; font-size: 180%; } .header-rt-nav { width: 130px; margin: 0px; padding: 0px; border-left: 1px solid rgb(68, 34, 0); border-right: 1px solid rgb(68, 34, 0); vertical-align: middle; font-weight: bold; color: rgb(68, 34, 0); } .header-rt-nav ul { margin: 0px; padding: 0px; font-size: medium; font-weight: bold; color: rgb(68, 34, 0); line-height: 19px; white-space: nowrap; } .header-rt-nav li { list-style-type: none; display: block; } .header-rt-nav li a { padding: 1px 5px; text-decoration: none; color: rgb(68, 34, 0); } .header-rt-nav li a:link { color: rgb(68, 34, 0); } .header-rt-nav li a:visited { color: rgb(68, 34, 0); } .header-rt-nav li a:hover { color: white; background-color: rgb(68, 34, 0); } THanks! Please look at this page in FF http://www.roadhousecamper.com/camper.asp?rv=17 Notice div with the red background and the thumbnails? It should float to the right of the large image but is does not. It does though in IE7? Thanks for any help. T |