CSS - Need To Get Objects To Sit Next To Each Other
I need help trying to get two objects to sit next to each other so i have a navigation menu on the left and a content area on the right. I have created these but the object pushes the second object underneath it i dont want this to happen.
im new to css #banner { background-color:red; text-align:center; border:solid black; } #rightcontent { float:right; text-align:center; border:solid black; } #leftcontent { margin:3px; color:white; background-color:black; text-align:left; border:solid black 1px; float:left; } h2 { text-align:center; } thats my code Similar TutorialsSuppose I have a DIV element that is set to, say, 750 by 750 px, and I want another, smaller, DIV element positioned in it (over it?). Suppose the second DIV element while smaller, does not have set dimensions. How do I center it horizontally within (over?) the first, larger DIV? IF I where to use tables I might do this: Code: <table align="center"> <tr> <td align="center" valign="middle"> <img> </td> </tr> </table> Or another table, not an image... But I don't want to use tables... Hello there. I have an issue with css styling of objects only in Internet Explorer. I am using IE9 and i have tested the styling with other version and still i got the same result. This is my problem. I am using this css: Code: #map { margin:0 auto; padding:0; width:800px; height:461px; background:url(images/wrdmap_1.jpg) top left no-repeat #fff; font-family:arial, helvetica, sans-serif; font-size:8pt; } #map li { margin:0; padding:0; list-style:none; } #map li h10 { position:absolute; display:block; background:url(images/blank.gif); text-decoration:none; color:#000; } #map li h10 span { display:none; } #map li h10:hover span { position:relative; display:block; width:200px; left:10px; top:10px; border:1px solid #000; background:#fff; padding:5px; filter:alpha(opacity=80); opacity:0.8; } #map h10.senzshen { top:215px; left:555px; width:20px; height:20px; position:relative; z-index:0; } #map h10.slovenia { top:143px; left:385px; width:20px; height:20px; position:relative; z-index:0; } and this html code: Code: <ul id="map"> <li><h10 class="senzshen"><span><b>Shenzshen</b><br> Primer pisano za kontaktot msn, skype lnikoj ova ona.</span></h10></li> <!--[if !IE]> --> <!-- <![endif]--> <li><h10 class="slovenia"><span><b>Slovenia</b><br> Primer pisano za kontaktot msn, skype lnikoj ova ona. <a href="#">Proba</a></span></h10></li> </ul> to produce world map with 2 dots which on hover will show tooltips with information's. however this code works good with firefox and chrome and the dots are displayed on the exact position as i need but when browsing the web page with internet explorer the dots are displayed outside the map on wrong position. is there any way i can fix this? Thanks in advance. Best wishes Svarc. For a page I'm writing, when I call a new object, a document.write() line is called in which it writes html/css tags to bring a picture corresponding to that object on the page. The problem is it won't let me change the properties that I normally could, such as .top or .left, etc. For example, when I make the object "chef" there is a line: document.write("<div id='chefDiv' style='position:absolute; top:"+this.y+"; left:"+this.x+"; z-index:2'><img src="+this.src+" name='chefbmp'></div>"); Then, in a totally different area of the code I try: document.getElementById('chefDiv').style.top = 200; ... and the location of the chefDiv does not change. However if I try the code: alert(document.getElementById('chefDiv').style.top); ... it will bring an alert message that says "407px". What am I doing wrong here? Is there something different about this because I'm using objects and constructors? Or is it because I'm using document.write(....) instead of directly writing the html in the page? How can I change the aspects of my chefDiv? Thanks! Kevin Hello, I'm brand new to this CSS business, so please be gentle! I'm trying to place my AP Div objects inside a table so that their positions are relative to the edges of the table, rather than relative to the edges of the browser window. I'm guessing I need to somehow put the code for the table around the code for the AP Div objects, but I can't work out how it's supposed to look. Any guidance would be much appreciated. Thanks! Please realize this question is coming from a new CSSer. I would like to have the text I have in the content area wrap around the box on the right. So when I type more content, the bottom portion will extend below the box. The box will always stay at the top. can someone help me do this? My page By the way, I know it doesn't render properly in FireFox - I was going to ask about that later. I used the CSS Tricks dot com guide to make my menu bar items equidistant from one another and it works perfectly in Chrome, Firefox and IE8.... but not IE7 (or IE8 Compatibility Mode). BTW the guide example works fine in IE7 but I'm doing something only ever so slightly different. I really don't have a clue what to do, so would appreciate some help. Here's the relevant CSS code I'm using: Quote: #content { width:1000px; margin-left:auto; margin-right:auto; margin-top:0; margin-bottom:0; padding:0; padding-top:230px; } /* Menu */ #menu { height:40px; padding:0; padding-left:40px; padding-right:40px; display:block; } #menu a { margin:0; padding:0; display:block; float:left; } #menu a span { position:relative; display:block; z-index:-1; } #menu-row { margin: -40px 0 0 150px; padding: 0; height: 40px; } #menu-row div { width: 33.3%; float: left; } #menu-row div a { float: right; } #menu .home { background: url(images/menu-home.png) 0 0 no-repeat; display: block; width: 150px; height: 40px; outline: none; } #menu .science { background: url(images/menu-science.png) 0 0 no-repeat; display: block; width: 150px; height: 40px; outline: none; } #menu .radio { background: url(images/menu-radio.png) 0 0 no-repeat; display: block; width: 150px; height: 40px; outline: none; } #menu .club { background: url(images/menu-club.png) 0 0 no-repeat; display: block; width: 150px; height: 40px; outline: none; } and HTML Quote: <div id="content"> <div id="menu"> <a href="#" class="home"><span>Home</span></a> <div id="menu-row"> <div><a href="#" class="science"><span>Science</span></a></div> <div><a href="#" class="radio"><span>Radio</span></a></div> <div><a href="#" class="club"><span>Club</span></a></div> </div> <!--/movers-row --> </div> <!--/menu --> All the links in the menu-row div are shifted up vertically from the first link in IE7 and I don't know why? Hello, In CSS is there a way to tell an object to extend the full height and width of its parameters without specifying height and using absolute positioning? Thanks, Andy Hi, I'm new here and hope someone can help! I wasn't sure whether to post this in the CSS or Flash forum; it's a problem caused by Flash which I suspect needs some clever CSS to resolve. My new website is carolineofbrunswick (dot) co (dot) uk. As you can see, there's a ton of blank space off to the right of the pages, and I can't figure out how to get rid of it. It's caused by the Flash objects in the right-hand column. Changing the width attributes on those Flash objects just causes them to not appear at all, though the blank space still exists. Can anyone help? Cliff |