CSS - Css Positioning Dilema
I'm trying to create a page with out using HTML tables but am having a tough time getting things to do what I want.
You can see what I've got so far here. You can view the css here. The problem I'm having is with the three white div areas. The top left one I call "news" the top right one I call "calendar" and the bottom one I call "main". If I was using tables I would code it like this... <TABLE> <TR> <TD>news content</TD> <TD width=200>calendar content</TD> </TR> <TR> <TD colspan=2>main content</TD> </TR> </TABLE> That would make it so that no matter what height the calendar or news elements were the main content would always fall below both. As I have it set now if there is a lot of content in the news window then it looks fine, but if there is only a little content in the news content then main content rides up under the calendar content. I've have tried every trick I can think of to no avail. So I need the help of someone a little more CSS savy than I am. Also... I have been doing most of my testing in IE6. I have looked at it in NN7 and the general concept is the same but the alignment is off. If you know how to fix that in the proccess I will be greatful. Similar TutorialsHey guys, Never needed to ask for help before but I've ran out of ideas with this one. I'm in the process of making a web development site and ironicly, came into a problem with the CSS. I have a main content area like every site does where all the content goes. And then a navigation to the right of the content box for things like search, or additional links that I might want to add. http://img254.imageshack.us/img254/1762/heightproblempp4.jpg <--- Img here Because I need the navigation to be 100% height, its caused me a lot of time trying to get it to work. I need to set the .body and the .cont_nav css classes both to 100% height for the navigation height to work as I would "correctly". However when .body has a set width its causing overflow of the text. (seen below) http://img257.imageshack.us/img257/8436/footerproblemic6.png And im hoping there is a way to get both the content not overflowing and height set to 100% so that the navigation can work. Code: .body <--- White Area with curl { background-color: white; color: #333333; background-image: url(images/curl.jpg); background-repeat:no-repeat; height: 100%; <---- Problem } #wrap { width: 75%; float: left; } .content { padding-top: 70px; width: 80%; margin-left: 80px; padding-bottom: 60px; } .cont_nav <--- Right navigation { float: left; width: 200px; padding-left: 15px; padding-right: 15px; background-color: #c9c9c9; border-left: 1px solid #a3a3a3; border-right: 1px solid #a3a3a3; height: 100%; <--- Only works when body height is set to 100% } .cont_nav_inner { padding-top: 15px; } HTML Code: Code: <div class="body"> <div id="wrap"> <div class="content"> <!-- MAIN CONTENT HERE --> </div> </div> <div class="cont_nav"> <div class="cont_nav_inner"> <img src="css/dropdown/themes/nvidia/images/ads.gif" alt="Sponsors" class="icon"/><h2 style="padding-bottom: 4px;">Sponsors</h2> <small>We are suppored by</small><br /> <!-- Sponsored by images go here --> <hr /> </div> </div> </div> I hope you can fully understand my situation, Im rubbish at explaining problems :P Summary: Left navigation only works at 100% height when a parent is set, however when the parent (.body) has a height of 100% the content overflows. Praying for a way that full height can be possible that the content doesnt overflow as atm if i fix the navigation the content breaks if i fix the content the navigation breaks . -Phil I have problem with footer DIV in this layout (the order of DIV's in code after <body> should be - content, left, right, right2, header, footer - positioned centraly with fixed values): It needs to be sticked to fit after content of 4 column DIV's like it is in example. http://www.split.info/dev/less-content/ http://www.split.info/dev/more-content/ 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=iso-8859-1"> <title>Title of website</title> <style type="text/css"> <!-- body {margin: 0px 0px 0px 0px; background-image:url(images/bg.jpg); background-position:center; background-repeat:repeat-y;} #wrapper {width: 1000px; margin: 0 auto; text-align: left; position: relative;} #contentPane {width: 468px; float: left; position: absolute; margin-left: 3px; padding: 0px 0px 0px 0px; background-color:#0099FF; left: 126px; top: 150px;} #leftPane {width: 125px; float: left; left: 0px; position: absolute; background-color: #99FFFF; top: 150px;} #rightPane {width: 173px; float: right; right: 226px; background-color:#999966; position: absolute; top: 150px;} #rightPane2 {width: 220px; float: right; right: 0px; background-color:#99FF00; top: 150px; position: absolute;} #headwide {background-image: url(images/head_bg.jpg); background-position: center; background-repeat: no-repeat; width: 100%; height: 142px; position: absolute; top: 0px;} #header {margin: 0pt auto; width: 1000px; background-color:#CC6600; height: 142px; } #footer {position: absolute; width: 100%; top: auto; bottom: 0px; background-color: #CCFFCC; height: 50px;} --> </style> </head> <body> <div id="wrapper"> <div id="contentPane">Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> </div> <div id="leftPane">Left Pane area<br> Left Pane area<br> Left Pane area<br> Left Pane area<br> Left Pane area<br> Left Pane area<br> Left Pane area<br> Left Pane area<br> Left Pane area<br> </div> <div id="rightPane">Right Pane area<br> Right Pane area<br> Right Pane area<br> Right Pane area<br> Right Pane area<br> Right Pane area<br> Right Pane area<br> Right Pane area<br> Right Pane area<br> </div> <div id="rightPane2">Right Pane 2 area<br> Right Pane 2 area<br> Right Pane 2 area<br> Right Pane 2 area<br> Right Pane 2 area<br> Right Pane 2 area<br> Right Pane 2 area<br> Right Pane 2 area<br> </div> </div> <div id="headwide"> <div id="header">Header area</div> </div> <div id="footer"><strong>Content from above 4 column div's need to push footer DIV below (after them)! </strong>Footer area that is on bottom of div with biggest height (content, left, right or right 2 pane)... foooter follow right after end of content from those div's (regular behaviour of next table row below any of those 4 columns). Current state like it is in this document happens that if you add more data f.i. in content area (outside one screen), it will go trough footer... So footer can be either moved in code after rightpane2 div after end of wrapper. Pls help. Thx!</div> </body> </html> Content from above 4 column div's need to push footer DIV below (after them)! Foooter need to follow right after end of content from those div's (regular behaviour of next table row below any of those 4 columns). Current issue like it is in this layout happens that if you add more data f.i. in content area (outside one screen), it will go trough footer... So in your resolution footer can be also moved in code after rightpane2 DIV, after end of wrapper. Pls help. Thx! Echo Hey guys, I am in need of a bit of help. The following URL incurs some pretty bad busts in IE (Mac and PC), that busts differently depending on the version. If I could get some feedback on what is happening and if possible maybe some posting of the code that fixes the problems. URL: http://clients.gravitydigital.com/pure_excitement/welcome.html Thanks for your help in advance, Collin Hello, I am a complete newb to CSS and I am trying to position on image on my page, what is the correct syntax (the html, and CSS) for me to be able to place an image where ever i want on the screen? Thanks so much for the help can somebody help me align this UL to the bottom right of this table. i put valign="bottom" and align="right" but it didn't work, i tried to put padding and margins in the CSS to move it over and it just won't work. any help would be greatly appreciated. HTML Code: <table id="products_page" border="0" cellpadding="0" cellspacing="0" width="800"> <tr id="upper_nav" height="198"> <td valign="bottom"> <ul class="navlist"> <li> <a href="index.html">Home</a></li> <li><a href="about_us.html">About Us</a></li> <li><a href="contact_us.html">Contact Us</a></li> <li><a href="contact_us.html">Contact Us</a></li> <li><a href="contact_us.html">Shipping Information</a></li> <li><a href="contact_us.html">Return Policy</a></li> <li style="border-right:none;"><a href="showcart.cfm">ViewCart</a></li> </ul> </td> </tr> </table> Code: .navlist li { font-size: 12px; font-family: Helvetica, Times, serif; display: inline; list-style-type: none; padding: 0px 10px; border-right: 1px solid black; float: left; position: relative; } #upper_nav { background-image:url('http://lonepineprairiepillows.com/Cart/cw3/Assets/cart_images/base_page.jpg'); background-repeat: no-repeat; } I have inputted some css popup text on roll over for some social bookmarking buttons on a new blog skin. (pkevan.blogspot) The problem I am having is placing where they pop-up. I can't use an absolute position because who knows where a post will be along with multiple posts. Right now there floating underneath the icons at the left hand side. I want the text to appear to the right of the icons inline with them. I'm having trouble positioning them there though. Any help, or properties that might be useful will be greatly appreciated. Thanks in advance. Heres what I have applied so far. div#socialbookmarks a span {display: none; } div#socialbookmarks a:hover span {display: block; float: left; position: inline; top: 0px; left: 0px; width: 20px; padding: 0px; margin: 0px; z-index: 0; color: #4AAAFA; background: transparent; } I have a few more questions on css positioning. How to center the content; What about the positioning of the inside tags? If you want to position at a specific place. Code: <body style="width: 100%; background-color: #808000;" onLoad="parseXML(); bodyOnload();"> <div id="master" style="float: left; display: block; text-align: left; width: 955px;"> <div id="navbar" style="position: absolute; left: 10px; top: 10px; margin: 0 0 10px 0; border: none; background-color: #FFCC00; width: 200px; height: 180px;"></div> <div id="picbar" style="position: absolute; left: 10px; top: 200px; margin: 0 0 10px 0; border: none; background-color: #FFCC00; width: 200px; height: 390px; overflow-y: scroll;"></div> <div id="maindiv" style="position: absolute; left: 230px; top: 10px; border: none; background-color: #FFFFAE; width: 700px; height: 580px;"> <div id="galbar" style="position: absolute; left: 150px; top: 0px; z-index: 3;"></div> </div> </div> </body> I have a select menu that I want to sit on the bottom of the page regardless of the length of the page. How can this be achieved? Height of menu is 235px and width is 150px. Hello, I have a flash movie that keeps moving out of place when the browser size is altered. How can I make it so the movie stays in one spot no matter what the browser size? Hi guys, I'm pretty new to web design, so please be gentle. I have an issue with CSS positioning that I'm trying to figure out. After research, I figured out how to align a div to the centre using an external stylesheet. However, I want this div to be positioned at the very top of the page. Currently, it sits approx 100px from the top and I can't figure out how to position it to 0px. Here's my code; body { text-align: center; margin: 5em 0 0 0; vertical-align: middle; } #content { width: 760px; text-align: left; margin: 0 auto; background-color: #000000; top: 0px; } Can anyone help me? Thanks Luke stupid question I have a three column layout I picked up from the web here and there and I am trying to be clever and of course, since I am not a CSS pro...I am blowing it! the css I am messing with is as follows: container holds the three columns and the header and footer. in the header section..which is called #top, I have an image which is the logo for the page. The top is 95 px high. what I wanted to do was split the TOP div into two sections, with the second one starting at 340px from the left and go about 250 px across. naturally, I tried to use: #new_section { margin-left: 323px; margin-right: 0px; margin-top:55px;---bottom of #TOP div--- padding:0px 0px 40px 0px; border-bottom:2px solid #D7C8AC; background-color:#E2DCDC; } all the variations I used either worked in IE and not NS or vice versa. I know it is just a simple positioning issue I am overlooking. any help would be appreciated greatly. thanks! jpm226@comcast.net ************************** #container { width:auto; margin:0px 0px 0px 0px; background-color:transparent; color: #333; line-height: 130%; background-image:url(bg.gif); background-position:left; background-repeat:repeat-y; } #top { padding:0px; height:95px; border-bottom:2px solid #E2DCDC; background-color:#F5F5F5; background-image:url(header.gif); background-repeat:no-repeat; background-position:left; } .text{ padding:4px; fontalatino linotype; color:#000; text-align:justify; } #leftnav { float: left; width: 322px; margin-top:0px; padding:0px; } #rightnav { float: right; width: 214px; margin-top:149px; margin-right:2px; padding:0px; background-color:transparent; /*border-left:1px solid green; border-right:1px solid green;*/ } .news { margin: 0px 10px 0px 10px; background-color:transparent; /*height:235px;*/ border: 2px solid #fff; } #image { margin-left: 323px; margin-right: 0px; margin-top:0px; padding:0px 0px 96px 0px; border-bottom:2px solid #D7C8AC; background-color:#E2DCDC; background-image:url(desk.gif); background-position:right; background-repeat:no-repeat; } #content { margin-left:323px; margin-right: 216px; margin-top:0px; padding:10px 0px 30px 0px; max-width: 36em; border-left:1px solid red; border-right:1px solid red; background-color:transparent; } .content2 { position:relative; /* Position is declared "relative" to gain control of stacking order (z-index). */ width:auto; min-width:120px; margin:20px 8px 10px 8px; border-top:2px solid #fff; border-bottom:2px solid #fff; background-color:#F5F5F5; padding:10px; z-index:3; /* This allows the content to overlap the right menu in narrow windows in good browsers. */ } #footer { clear: both; margin: 0; padding:0px; color: #333; border-top: 1px solid #fff; background-color:#EEE8E8; } I wasn't sure how to title this problem as I'm not sure exactly what it is. I've only been learning CSS over the last few days and transformed an old site as I went. learnware .com . au/css/index .htm The page displays fine in IE7 and FF but in IE6 the left menu moves over and sits just over the top of the left hand edge of the green area in the middle. I'm not sure what code to post or which area to focus on. I'm hoping someone can assist me with what I should be looking at. I've spent all night looking at forums, etc trying to figure out where the problem lies but I can't even get that far! (Sorry if I've disobeyed any forum rules) thanks for taking the time to read my question. I have a div that I want to float right, but it is staying on the left side, and I can't figure out why. 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"> <head> <meta name="description" content="Warren Persowich Humour Facilitator - Stand-Up Comedian Winnipeg Manitoba. Comedic entertainment performances laughter and insight. Fun professional development. A decade of stand-up experience." /> <meta name="keywords" content="Warren Persowich, Comedian, Comedic, Stand Up, Stand-Up, Comedy, Business, Winnipeg, Manitoba, Cancer, Entertainment, Funny, Hilarious, Interactive, Laughter, Psychology, Professional, Development" /> <meta name="Revisit-After" content="7 Days" /> <meta name="Robots" content="index, follow" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="verify-v1" content="ongXn98vPdWEemx2Lu5qZozNxw3CDdugXLIpK9XzOr4=" /> <title>2 Nations Female Hockey League:::::</title> <script type="text/javascript" src="Javascript/coolmenu.js"></script> <script type="text/javascript" src="Javascript/menu_items.js"></script> <link rel="stylesheet" type="text/css" href="menu_styles.css"> <link rel="stylesheet" type="text/css" href="2NFHL.css"> </head> <body> <script type="text/javascript">var m1 = new COOLjsMenu("menu1", MENU_ITEMS)</script> <div class="LogoDiv"><a href="Index.htm"><img class="Logo" src="Images/WOMENSHOCKEY CHOICE 1Small2.jpg" alt="Two Nations Female Hockey League"></a></div> <div class="NavDiv"> <p class="TeamsNav">Teams: <a href="Team1">Coyotes</a> | <a href="Team2">Extreme</a> | <a href="Team3">Ice Cats</a> | <a href="Team4">Saints</a> | <a href="Team5">Mustangs</a> | <a href="Team6">Lightening</a> | <a href="Team7">On Edge</a></p> </div> <div class="ContentDiv"> <div class="prop"></div> <div class="Welcome"> <p class="FirstLine">Welcome to the Two Nations Female Hockey Leage web site.</p> <p>The Two Nations Female Hockey Leage is a Spring - Summer league that is comprised of female hockey teams hailing from both Canada and United States.</p> <p>To learn more about the Two Nations Female Hockey League, click <a href="AboutUs.htm">here</a> or use the About Us link in the navigation bar above.</p> </div> <div class="TNFHLTW"> <p class="TNFHLTWP">This week in the TNFHL the Coyote's and On Edge faced off in Winnipeg, Manitoba. The teams skated to a 3 all tie.</p> </div> <div class="Banners"> <div class="BannerCont"><img src="Images/ChampWeekend.gif" /></div> <div class="BannerCont"><img src="Images/ChampWeekend.gif" /></div> </div> <div class="clearprop"></div> </div> <div class="BottomNavDiv"> <div class="BottomNavDivCont"> <p class="BottomNavLinkP"><a href="Index.htm" class="BottomNavLink">Home</a> | <a href="Index.htm" class="BottomNavLink">About Us</a> | <a href="Index.htm" class="BottomNavLink">Philosophy</a> | <a href="Index.htm" class="BottomNavLink">Teams</a> | <a href="Index.htm" class="BottomNavLink">Standings</a> | <a href="Index.htm" class="BottomNavLink">Schedule</a> | <a href="Index.htm" class="BottomNavLink">Contact Us</a> | <a href="Index.htm" class="BottomNavLink">Links</a><p/> </div> </div> </body> </html> CSS: Code: html, body { height: 100%; padding: 0; margin: 0; } .LogoDiv { /*background-image:url("Images/WOMENSHOCKEY CHOICE 1Small2.jpg"); background-repeat: no-repeat; background-position: top left;*/ margin: 2px auto; padding: 0px; height: 87px; width: 800px; display: block; } img.Logo { border: 0px; } .Banners { float: right; width: 300; margin: 20px 20px 0px 0px; padding: 0px; background-color: red; /*clear: both;*/ } .BannerCont { width: 300; height: 50px; margin: 5px 0px 0px 0px; padding: 5px 0px 0px 0px; background-color:#362161; } .NavDiv { background-image: url(Images/N2NavBar2.jpg); background-repeat: repeat-x; background-position: top left; padding: 10px 0px 0px 0px; margin: 0px 0px -13px 0px; height: 80px; width: 100%; display: block; } .TeamsNav { padding: 0px; margin: 0px 0px 0px 400px; font-size: 12px; } /*.prop and .clearprop are in here to create a min height of 400px*/ .prop { height: 400px; width: 1px; float: right; background-color: yellow; } .clearprop { clear: both; height: 1px; overflow: hidden; background-color: yellow; } .ContentDiv { width: 800px; /*height: 400px;*/ overflow: hidden; background-image:url(Images/Background-Blue3.jpg); background-repeat: no-repeat; background-position: top left; margin: 0px auto; padding: 0px; display: block; position:static; z-index: -1; } .TNFHLTW{ width: 212px; overflow: hidden; background-image:url(Images/TNFHLThisWeekShortNarrow.gif); background-position: top left; background-repeat: no-repeat; margin: 50px 0px 0px 30px; padding: 50px 0px 0px 0px; } .Welcome { float: right; margin: 10px 20px 0px 0px; overflow: hidden; width: 450px; background-color: aqua; } .FirstLine { font-size: 20px; margin: 0px; padding: 0px; text-align: center; } .COC1 { padding: 2px; margin: 50px 0px 0px 30px; width: 700px; float: left; text-indent: 20px; } .COC { padding: 2px; margin: 10px 0px 0px 30px; width: 700px; float: left; text-indent: 20px; } .OLHolder { margin: 10px 0px 0px 30px; padding: 2px; float: left; width: 700px; } .COCOL li { margin-bottom: 10px; } .COCTitle { padding: 2px; margin: 10px 0px 0px 30px; width: 700px; float: left; text-align: center; font-weight: bold; text-decoration: underline; font-size:18px; } .LinkList li { margin-top: 10px; list-style-type:none; } p.TNFHLTWP { border-left: 1px solid #000000; border-right: 1px solid #000000; border-bottom: 1px solid #000000; padding: 4px; margin: -20px 0px 0px 0px; font-size: 12px; background-color: #ffffff; } .BottomNavDiv { padding: 0px; height: 72px; width: 100%; display: block; border-top: 4px solid red; margin: 0px; height: 25px; } .BottomNavDivCont { margin: 0px auto; width: 800px; overflow: hidden; display: block; height: 25px; padding: 0px 0px 0px 20px; } /*.BottomNavDivCont ul li { display: inline; padding: 0px 10px 0px 0px; font-size: 10px; color: #ff0000; margin: 0px; }*/ .BottomNavLinkP { font-size: 10px; color: #ff0000; display: block; } .BottomNavLink { font-size: 10px; color: #ff0000; } a.BottomNavLink:link{ text-decoration: none; } a.BottomNavLink:visited{} a.BottomNavLink:hover{ text-decoration: underline; } a.BottomNavLink:active{} p.TeamsNav a:link{ text-decoration: none; color: #000099 } p.TeamsNav a:visited{} p.TeamsNav a:hover{ text-decoration: underline; } p.TeamsNav a:active{} .LinkList li a:link { text-decoration: none; color: #000099; } .LinkList li a:visited {} .LinkList li a:hover { text-decoration: underline; } .LinkList li a:active {} I put clear:both on .Banners but then it moves to the bottom under .prop I'd like .Banners to be under .Welcome The page displays the same in FF and IE7, but in IE6 .Banners stretches across most of the .ContentDiv help? I'm using a JS/CSS calender script found at http://www.dynarch.com/projects/calendar/. It works great except for one thing.. it wont position correctly in IE (6 & 7). I have a form with 20 text inputs strait down a page. As per instruction i place the following code just below my desired text input, say at tab index 12. Code: <script type="text/javascript"> Calendar.setup({ inputField : "this_fieled_name", // id of the input field ifFormat : "%Y-%m-%d", // format of the input field showsTime : true, timeFormat : "24" }); </script> When the page and script run, in Firefox its perfect, but in IE, the calender places almost 200px high than desired near tab index 6. My question is, how do i get IE to position as FF does? Here are i think the two most important files that may need affecting. Both are stock from download. http://www.empiresolutions.net/demo/calendar-setup.js http://www.empiresolutions.net/demo/theme.css Thanks much. Cesar Hello all, i have a page setup which is working well in all browsers. I have a div layer positioined in the page at the moment it is positioned absolute, and it is in the correct place you can see it at www.loadedtechnologies.com/impact , the layer is id="demoImage", you can have a look at the css file in page source. I don't want this layer positioned absolute, i want it to be relative to the "MidTopContent" layer, so that when the ADMIN menu appears on the top of the page once logged in, the demoImage layer will follow down within MidTopContent, Please help THANKS Hi all, hoping someone can help me with what feels like it should be a simple problem, but one I can't work out. Apologies if the problem seems too obvious to you, I'm a total noob at this. I basically have two div objects within a space beneath the header. These are a video player, which is fine, and a scrolling menu. Presently the menu (navigation.php) is off the bottom-right, beneath the video, and I simply want to force it to the TOP right, parallel with the player. My code is below, and I'm looking for an elegant css solution if possible. Any more info needed, just ask. I took a grab, but the forum won't let me post links. Cheers in advance. </style> </head> <body bgcolor="#B94F1F"> <div id="container"> <div id="header"><?php include("header.php"); ?></div> <div id="wrapper"> <p id='preview'>The player will show in this paragraph</p> Words here? <p>Paragraph <p>Paragraph <script type='text/javascript' src='swfobject.js'></script> <script type='text/javascript'> var s1 = new SWFObject('player.swf','player','640','380','9'); s1.addParam('allowfullscreen','true'); s1.addParam('allowscriptaccess','always'); s1.addParam('flashvars','file=xxx'); s1.write('preview'); </script> <div id="navigation" style="width:300px;height:430px;overflow:auto;border-width:1px;border-color:000000;border-style:solid;"> <font size=2> <div id="header"><?php include("navigation.php"); ?></div> </font></div> Okay I need help with this CSS, I am very new with CSS I am having trouble positioning this Navigation Bar to the right, it is stuck to the left, and I need it to be so it will always stay on top of everything. My HTML Page The Code. Code: <head><noscript></noscript><!-- --><script type="text/javascript" src="http://www.freewebs.com/p.js"></script><script SRC="http://mytubeforum.webs.com/jquery-1.3.2.min.js"></SCRIPT> <script type="text/javascript"> function nav(){ $('div#nav ul li').mouseover(function() { $(this).find('ul:first').show(); }); $('div#nav ul li').mouseleave(function() { $('div#nav ul li ul').hide(); }); $('div#nav ul li ul').mouseleave(function() { $('div#nav ul li ul').hide();; }); }; $(document).ready(function() { nav(); }); </script> <style type="text/css"> /*NAVBAR CODE*/ #nav{ width: 460px; padding:460px; float: right; align: right; position: absolute; background:url(http://i34.tinypic.com/5bzbmd.png); background-repeat: no-repeat; height:38px; line-height:32px; padding:0 10px; } #nav ul, #nav ul li { margin:0; padding:0; list-style:none; } #nav ul li{ float:left; display:block; } #nav ul li a:link, #nav ul li a:visited{ color:#000000; font-size:14px; font-weight:bold; text-decoration:none; padding:0 30px 0 10px;; margin-top:3.5px; display:block; } #nav ul li a:hover{ color:#3b414c } #nav ul li ul li{ float:none; display:block; } #nav ul li ul li a:link, #nav ul li ul li a:visited{ color:#444; font-size:12px; font-weight:bold; text-decoration:none; padding:0 20px; clear:both; border-bottom:solid 1px #DEDEDE; -moz-border-radius-bottomleft: 10px; -webkit-border-bottom-left-radius: 10px; -moz-border-radius-bottomright: 10px; -webkit-border-bottom-right-radius: 10px; } #nav ul li ul li a:hover{ color:#3b414c; background:#EBEFF7; } .submenu { position: absolute; width: 140px; background: #efefef; padding:20px; border:solid 1px #b2b2b2; border-top:none; z-index: 1000; display:none; line-height:26px; padding: 15px; -moz-border-radius-bottomleft: 10px; -webkit-border-bottom-left-radius: 10px; -moz-border-radius-bottomright: 10px; -webkit-border-bottom-right-radius: 10px; } </style> </head> <body> <div id="nav"> <ul> <li><a href="#">MyTube</a> <ul class="submenu"> <li><a href="/forum.htm">Home</a></li> <li><a href="/portal.htm">Portal</a></li> <li><a href="/arcade-f12/">Arcade</a></li> <li><a href="/calendar.htm">Calendar</a></li> <li><a href="/search.forum">Search</a></li> <li><a href="/faq.htm">FAQ</a></li> <li><a href="/memberlist.forum">Members</a></li> <li><a href="/groupcp.forum">Groups</a></li> <li><a href="/MyTube-Chat-h2.htm">Chatbox</a></li> </ul> </li> <li><a href="#">Messages</a> <ul class="submenu"> <li><a href="/msg.forum?folder=inbox">Inbox</a></li> <li><a href="/msg.forum?folder=sentbox">Sentbox</a></li> <li><a href="/msg.forum?folder=outbox">Outbox</a></li> <li><a href="/msg.forum?folder=savebox">Saved Mail</a></li> </ul> </li> <li><a href="#">Profile</a> <ul class="submenu"> <li><a href="http://mytube.7forum.net//profile.forum?mode=editprofile">Information</a></li> <li><a href="http://mytube.7forum.net//profile.forum?mode=editprofile&page_profil=preferences">Preferences</a></li> <li><a href="http://mytube.7forum.net//profile.forum?mode=editprofile&page_profil=signature">Signature</a></li> <li><a href="http://mytube.7forum.net//profile.forum?mode=editprofile&page_profil=avatars">Avatar</a></li> <li><a href="http://mytube.7forum.net//profile.forum?mode=editprofile&page_profil=friendsfoes">Friends & Foes</a></li> </ul> </li> <li><a href="#">Log In | Out</a> <ul class="submenu"> Under Construction<hr> <li><a href="/profile.forum?mode=register">Register</a></li> <li><a href="/login.forum?connexion">Login</a></li> </ul> </li> </div> Please Help Me, Thank you. Here is my CSS
Code: .container { margin-top: 0; width: 100%; \width: 100%; w\idth: 100%; border: 1px solid gray; } .banner { background-color: rgb(213, 219, 225); top: 0px; left: 0px; width: 100%; left: 0; top: 0; position: relative; } .content { margin-left: 200px; background-color: gray; height: 100%; left: 0; top: 0; position: relative; } .sidebar-a { float: left; width: 200px; \width: 200px; w\idth: 200px; background-color: rgb(235, 235, 235); height: 100%; left: 0; top: 0; position: relative; } .footer { clear: both; padding: 0; margin-top: 0; background-color: rgb(213, 219, 225); } And it outputs...this . I was wondering how I get rid of the white spaces around the banner. Thanks. I'm starting to create a new site, and I'm having some issues deciding how to create it. I want a header, footer, and 3 columns. This is the CSS I have created, but have some issues with it. Should I use absolute positioning for all elements? The bottom bar isn't lining up at all. Also, for the middle content, how do I get my info into there easily? I will be using the main page as a php page that I will include on all my pages. Should I not use a middle content section? #content { margin-left: 199px; margin-right: 199px; border-top: 1px solid Black; border-bottom: 1px solid black; height:450px; position:absolute; top:59px; width:585px; } #titleBar { background-color: #333399; text-align: center; font: bold large Courier New; height: 40px; padding: 8px; border-top: 1px solid Black; border-left: 1px solid Black; border-right: 1px solid Black; color:#FF9933; } #bottomBar { background-color: #333399; text-align: center; font: normal x-small Courier New; height: 20px; padding: 4px; border-bottom: 1px solid Black; border-left: 1px solid Black; border-right: 1px solid Black; color: #FF9933; } #navleft { background-color: #FF9933; border: medium double; text-align: center; height: 450px; position: absolute; left:10px; top:59px; width:200px; border:1px solid #000; } #navright { background-color: #FF9933; border: medium double; text-align: center; width:200px; height:450px; position: absolute; right:10px; top:59px; width:200px; border:1px solid #000; } Hi bit of a newbie but confused by following code; The images all display ok and the rounded gif work ok but I get a gap between the divs (highlighted below). Is it margins/paddings? Pulling hair out! Thanks, Bill. .child { width: 200px; background-color:green; background-image: url(unt.bmp) ; } .parent {margin: 0; padding: 0} .bl1 {background: url(_round_bl.gif) bottom left no-repeat ;background-color: blue;width: 200px } .br1 {background: url(_round_br.gif) bottom right no-repeat;} .tl1 {background: url(_round_tl.gif) top left no-repeat;} .tr1 {background: url(_round_tr.gif) top right no-repeat;} </style> </head> <body> <div class="parent"> <div class="child"> <div class="tl1"> <div class="tr1"> <h2>Hello </h2> </div> </div> </div> /* When displayed in browser the above is separated from the following by a gap of around 20 odd px */ <div class="bl1"> <div class="br1"> <h2>Hello</h2> </div> </div> </div> </body> </html> |