CSS - Ul - Help Making Nav Please :)
Hey all
i want to create a simple horizontal navigation for my page spanning the container div (735px) i want to use a UL and float them to the left: Navigation Code: <div id="container"> <ul> <li>home</li> <li>nav2</li> <li>nav3</li> <li>nav4<li> <li>nav5<li> </ul> </div> CSS Code: #container{width:735px} ul {width:100%; height:35px; } li{width:149px; float:left} The problem im having / i dont know how to do are the following: 1. Within each li i want to put a link but i want it to be the whole block of 149 x 35 clickable for the link not just the words e.g HOME 2. how do i get the text of the nav to be positioned in the middle vertically. i tried: vertical-align or what ever it was but that didnt waork. For one of my nav items it drops down a line but the others stay at the top. id like them in the middle of the block?? thanks Similar Tutorialshttp://m2-klan.com/nuked.html How would I go about making this page all Css/div? My friend has been saying something that I can make that from all Css with less graphics, how would I go about doing that? I am a newbie at Css and I would like to know how to do that, instead of tables. How can I make the <th> on the right hand side align everything inside it to the right? I already have a class which applies to all my <th> [html] <thead> <tr> <th scope="col" class="twentyfive">STATUS</th> <th scope="col" class="twentyfive">VIEW</th> <th scope="col" class="twentyfive">DOWNLOAD</th> <th scope="col" class="twentyfive">TOTAL</th> </tr> </thead>[/html] Do I need to add something like this? [css] table.main thead tr th.twentyfive { /*border: 1px solid #fff;*/ width: 25%; } table.main thead tr th.twentyfive.right { /*border: 1px solid #fff;*/ width: 25%; float: right; }[/css] I was just wondering if there was a standard that most people use. Or do you just use each as the circumstances require? Ok, firstly, here is the link: www.mstrgaming.com/stars Now, if you look at the website in FF, then in IE, you'll notice that the absolutely poistioned #topbar (the horizontal bar right at the top) goes over the top of the floated logo & menu (whereas it doesn't in FF, which is the desired look). I'd welcome any suggestions as to why it does this, and more importantly how to prevent it. Also, the floated logo & menu is spaced away from the left side of the page, whereas in firefox, it isn't. I welcome any suggestions! The website is reletively simple so I don't think you should have any concerns with the code, but if you do by all means let me know . Thanks! Edit - how odd, I edited the title of this thread because I missed a word, and it won't change, oh well Hi, I am editing a dynamically driven site and I don't have access to edit the HTML code, just the CSS. I have a <div> with content in it within a <td> tag. When the div stretches past the width of the <td> tag it makes the table cell wider. Is there any way in CSS to have it not stretch the width of the cell? The <div> has an id="mylinks" on it, however the <td> or the <table> doesn't have any id or class on them. I'm pully my hair out trying to figure out a fix, any help would be greatly appreciated, Thanks in advance Hi, How common it is these days to make a web pages using only css and not using tables? And what are the pros and cons of that? Thanks Hi, I have attached 2 files code. I want the page to look like the second one.with both navigation boxes on the left on top of each other. But the 1st one I am trying to look the same with out putting the <divs> with in a <div> and it does not work, what am i doing technically wrong here? wrong one Code: <html> <head> <STYLE type=text/css> body { background-color: grey; font-size:14px; font-family:Verdana, Arial, Helvetica, sans-serif; } div#outer { width: 70%; height:75%; background-color:#FFFFFF; margin-top: 150px; margin-bottom: 30px; margin-left: auto; margin-right: auto; padding: 0px; } div#header { padding: 0px; margin-top: 0px; text-align: center; background-color:#659EC7; height:130; } div#nav { width: 30%; height: 200; padding: 0px; margin-top: 1px; float: left; background-color:#616D7E; } div#navt { margin-left: 0px; width: 30%; padding: 0px; margin-top: 210px; float: left; background-color:#616D7E; } div#main { margin-left: 40%; margin-top: 1px; padding: 0px; text-align: center; height:65%; } div#footer { padding: 0px; margin: 0px; text-align: center; height:62; } </STYLE> </head> <body> <div id="outer"> <div id="header"> <h3>Bank</h3> </div> <div id="nav"> <h4>Navigation</h4> <ul> <li>Let me not to the marriage of true minds</li> <li>Admit impediments; love is not love</li> <li>Which alters when it alteration finds</li> </ul> </div> <div id="navt"> <h4>Navigation1</h4> <ul> <li>Let me not to the marriage of true minds</li> <li>Admit impediments; love is not love</li> <li>Which alters when it alteration finds</li> </ul> </div> <div id="main"> <p>Main Content -- Love's not time's fool...</p> </div> <div id="footer"> <p>Footer text -- Admit impediments...</p> </div> </div> </body> </html> Right one Code: <html> <head> <STYLE type=text/css> body { background-color: grey; font-size:14px; font-family:Verdana, Arial, Helvetica, sans-serif; } div#outer { width: 70%; height:70%; background-color:#FFFFFF; margin-top: 150px; margin-bottom: 50px; margin-left: auto; margin-right: auto; padding: 0px; } div#header { padding: 0px; margin-top: 0px; text-align: center; background-color:#659EC7; height:130; } div#exp { width: 35%; padding: 0px; margin-top: 1px; float: left; } div#nav { width: 100%; height: 200; padding: 0px; margin-top: 1px; float: left; background-color:#616D7E; } div#navt { margin-left: 0px; width: 100%; padding: 0px; margin-top: 5px; float: left; background-color:#616D7E; } div#main { margin-left: 40%; margin-top: 1px; padding: 0px; text-align: center; height:65%; } div#footer { padding: 0px; margin: 0px; text-align: center; height:62; vertical-align:text-top; } </STYLE> </head> <body> <div id="outer"> <div id="header"> <h3>Bank</h3> </div> <div id=exp> <div id="nav"> <h4>Navigation</h4> <ul> <li>Let me not to the marriage of true minds</li> <li>Admit impediments; love is not love</li> <li>Which alters when it alteration finds</li> </ul> </div> <div id="navt"> <h4>Navigation1</h4> <ul> <li>Let me not to the marriage of true minds</li> <li>Admit impediments; love is not love</li> <li>Which alters when it alteration finds</li> </ul> </div> </div> <div id="main"> <p>Main Content -- Love's not time's fool...</p> </div> <div id="footer"> <p>Footer text -- Admit impediments...</p> </div> </div> </body> </html> I am VERY new at this, and I need all the help I can get. I am trying to make a table that looks like this: I am VERY new at this, and I need all the help I can get. I am trying to make a table that looks like this: http://i78. photobucket.com/albums/j108/l8org8or/HELP.jpg (take out the spaces before "photobucket") I need the table width to be 563, and I want everything to be centered. font size 14 and 9 Any help you can offer would be greatly appreciated. I need the table width to be 563, and I want everything to be centered. font size 14 and 9 Any help you can offer would be greatly appreciated. i have this site here and am looking for a solution to my css for resizing the window i need the .swf to appear underneath the main content box. any ideas?! i need to it to behave exactly like the .jpg on this page here anyone!? i thought i had finally gotten my design to where i wanted it, but then i tried it in internet explorer. he http://beta.bikerevolution.org/xindex.php any ideas on how to fix this would be great. Can someone point me to a tutorial that shows how you can use css borders, shadows, or whatever to make div's look 3D, or sunken in or something. Basically I want this div to look like a button, but only when the mouse is over it, and when it's depressed I want it to look like its sunken in. I know how to do all of this except the lighting and stuff, it looks kinda funny. So is there a tutorial that shows you the best way to make stuff look 3D? Thanks Sometimes CSS makes me want to tear my hair out. I'm trying to make a custom form input that is a combination of a regular select drop down and a multiple select. I have the javascript all sorted out and my input works like a charm. I can't figure out any way to make it display like a <select> does though. I thought I could simply do this: <ul style="display: inline"> According to w3schools, this will tell the element to display without a line break before or afterward. Much to my despair, it's not that simple. Here's an example: Code: <div> This is some text <select name="test"> <option value="">Click to expand</option> <option value="1">One</option> <option value="2">Two</option> </select> <input type="submit" value="Submit" /> </div> <hr /> <div> This is some text <ul name="test" style="display: inline;"> <li>Click to expand</li> <ul style="display: none;"> <li value="1">One</li> <li value="2">Two</li> </ul> </ul> <input type="submit" value="Submit" /> </div> Notice how the regular old html input sits nicely inline with the text before it and the submit button after it? Notice how the ul doesn't, despite the fact it's set to display inline? Anybody have any suggestions? 'Ello, This problem is a bit complex to try and explain on here so if this gets too confusing just let me know and I'll try and clear up whatever you are confused about. I am currently building a site that has a wrapper div with a width set to 100% and a max-width of 1000px so that on smaller screens the site will appear nicer and not have horizontal scrollbars. In this wrapper div is a content div that is 84% of the wrappers width and has it's margin set to 0 auto to make in then content div centre in the wrapper. What I'm wondering is if there is a way to change the content divs width from 84% to 100% once the wrapper div get to a small enough size. At the moment when the screen gets too small the content div is still 84% size of the wrapper div and centred, but say on a screen with a resolution of 800x600 I think it would be more beneficial to have to content div take up the whole wrapper to display more content. I was thinking of setting a min-width but then if the screen gets smaller than the min-width a horizontal scroll bar would appear. I was just wondering if something like this was possible, if not it doesn't matter to much as I can set the min-width up for a 800x600 screen resolution and anything below that probably isn't too important anyway. Hi everyone. I have a div with text and directly after that I have an image. Since a DIV is a block level element, it causes the image to wrap to the next line. Is there some way I can prevent it from doing so? Thanks for any help or suggestions. How would I change this to make list elements invisible? At the moment it just greys them out? div.sideBox ul li.disabled { display: block; padding: 2px 0 2px 7px; border-top: 1px solid #ccc; color: #777777; } So Id like to make the element basically like it doesnt exist. I dont want any spaces left over. Ive tried this div.sideBox ul li.disabled2 { visibility:hidden; } but it leaves an empty space. Hi, I need to make colored boxes a specific height. Also, the box must stretch to fit the text within it. The text will be updated when a user clicks different nav buttons. Here's my code:: Code: .category{ background-color:#8CC63F; color:#000000; font size:21pt; height:36px; } the problem is that the box isn't 36 pixels tall. you can see my example he link Look at the box with the text description, and the box that says "cam tu dao". Any ideas. I've been trying everything I could think of. thanks Hello. I am new to website making and I am trying to create a wrapper that is centered, and 2 <divs> in it. One that will align to the right of the wrapper, one to the left. Heres what I did CSS: Code: #Wrapper { z-index: 3; position: absolute; width:800px; height:600px; top:40px; margin-left: auto; margin-right: auto; border: 4px solid red; background-color: transparent; } #Left { z-index: 2; position: relative; width:80px; height:100px; top:20px; left:10px; border: 1px solid #FFF; background-color: rgb(255,255,0); } #Right { z-index: 1; position: relative; width:100px; height:80px; right:10px; border: 1px solid #FFF; background-color: rgb(0,255,0); } HTML Code: <!DOCTYPE html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml" <head> <link rel="stylesheet" type="text/css" href="style.css" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="author" content="Adzu Kiyako"> <meta name="copyright" content="Copyright Stuff here"> <meta name="robots" content="noindex"> <title>Title of my page</title> </head> <body> <body id="htmlsource"> <body style="background-color:#292929;"> <div id="Wrapper"></div> <div id="Left">This should be on the left side of the centered wrapper</div> <div id="Right">This should be on the Right side of the centered wrapper</div> </div> </body> </html> My problem is 1-The wrapper does NOT align in the center of the page, and 2- The 2 other <div> dont seem to care about my wrapper, the position themself relatively to the viewport, not my wrapper... Any clue of what I can do? Please go easy on me, this is so new to me! Thanks a million times! After doing some small changes to the design I checked it in IE6 and its not slightly out of place but very messed up. The site is http://www.orchard-homes.co.uk/, has anyone got any ideas? It seems like its been stretched vertically... Thanks! Hello, I am in the making of my first css site. I made some rounded corners boxes in photoshop and saved them as gif. When I load them in the css code, the image shows up as i wanted in the box divs, but the issue is that the white box around the rounded corners are there and is very disturbing. Any tips on how to remove these white edges? Any answer is appreciated |