CSS - Spacing Problems In A Menu
I've just started to learn CSS, and I've picked it up without much trouble so far, but I'm stuck with a small formatting problem I'm having.
Using Firefox, the spacing for the menus on the right and left side are basically where I want them to be. Link Horizontal Line Link HR and so on... The page is at http://www.mcconaha.com/csscenter.php and the CSS is at http://www.mcconaha.com/csscenter.css So I have two questions... 1) What formatting trick am I missing when it comes to the padding under text like that? I've used the padding attribute in the CSS, but it doesn't seem to do anything. The only solution I've found is to set the margins to -Xpx and use that, but then it overlaps in FF. This has to be simple and stupid, I just haven't figured it out. 2) This isn't as vital, but would be nice if I could figure out. The nav boxes are stacked down each side. If I add an item to the top box, I have to readjust the top attribute in the CSS for all boxes by whatever the increase in size of the first box was. Is there a way to align the top box, then make all the others conform down when you add something above? Thanks in advance. I'm sure I'll be posting more questions as I have them. Similar TutorialsHi, It seems I just can't get away from the height: 100% problems. I tryed making my body 100% and my container min-heaight 100% but that didn't work. I'll post the index and css below. I also want there to be a 15px space between each box 'lightbox, lightbox2, topbox, bottombox.. (they aren't spacing at all?) www.carbenco.com/resume/ index 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="en"> <head> <title>Terry Cantwell - Resume</title> <link href="stylesheet.css" rel="stylesheet" type="text/css" title="default" /> </head> <body> <div id="container"> <div id="topbox">Hi</div> <div class="lightbox">Hi</div> <div class="lightbox2">Hi</div> <div class="lightbox">Hi</div> <div class="lightbox2">Hi</div> <div class="lightbox">Hi</div> <div class="lightbox2">Hi</div> <div class="lightbox">Hi</div> <div id="bottombox">Hi</div> </div> </body> </html> css Code: body { margin: 0px; padding: 0px; text-align:center; background-color: #3F3727; font-size: 10px; font-family: Arial, Helvetica, sans-serif; height: 100%; } #container { position: relative; top: 0px; margin-left: auto; margin-right: auto; text-align:center; width: 600px; height: 100%; background-color: #E9E4DC; } #topbox { position: relative; top: 15px; margin-left: auto; margin-right: auto; text-align:left; width: 450px; padding: 5px; background-color: #e9e4dc; } .lightbox { position: relative; top: 15px; margin-left: auto; margin-right: auto; text-align:left; width: 450px; padding: 5px; background-color: #B1A283; } .lightbox2 { position: relative; top: 15px; margin-left: auto; margin-right: auto; text-align:left; width: 450px; padding: 5px; background-color: #9B8862; } #bottombox { position: relative; top: 15px; margin-left: auto; margin-right: auto; text-align:left; width: 450px; padding: 5px; background-color: #e9e4dc; } Hi, I'm developing the following site and am having some issues with spacing and heights. The first and major problem is in Firefox. As you will see at the bottom, my content "grows" out of it's wrapper div for some reason. It works great in IE, where the height of the content will determine how high both the side and main columns are. The second problem is in IE. There is too much space between the menu and the image above it. I want it to be flush to the image, as it is in Firefox. How can I go about solving these two issues? Hi guys I have a simple Wordpress website and I don't know anything about CSS I used a visual CSS editor called stylise to change a few things but I can't seem to get the spacing I can't put the URL here because I am a new member, but look at the pics and you will figure it out. Actually urls in pictures are removed as well so no pics. Website is theinterviewkit dot com What I want done is some simple spacing: The add to cart button doesn't line up I the store page, it is ok when I check the website on safari and Firefox, but on my iPad the add to cart button is beside the quantity box. I'd like it under Have images I marked up but The forum doesn't allow urls in posts of new users!!!!!! check store page When you click on the product and go to the product page, the add to cart is slightly to the left of the name and price. I would like it Lined up where the red line is. On safari and my iPad, it is as you see in the screen shot. On Firefox though, the add to cart button is under the picture. Unfortunately when I tried editing, any change I did moved the add to cart button on each page that had it (store page and every product page). I'm guessing because I'm editing that element instead of the spacing of the page. Had Image here but no urls allowed. Check product page Again, I don't know anything about CSS, only very very basic HTML. If anybody could figure it out that would be awesome. Here is the industry news page I have the picture floating either right or left with text beside it - then a line underneath it. I want the line to always be at least 10px below the picture. When the text is less, the line crosses into the picture. xhtml: Code: <div id="industry"> <h1>Industry News and Information</h1> <div class="row"> <span class="imgLeft"><img src="../images/ATS-ERS_thumb.jpg" width="100" height="100" alt="ERS ATS Logo" /></span> <h2>New single set of standards for ERS and ATS</h2> <p>Through the combined efforts of the European Respiratory Society (ERS) and the American Thoracic Society (ATS), there is now a new single set of standards for both sides of the Atlantic. <a href="/resources/industry_news/news_ers_ats.html">More ...</a></p> </div> <div class="row"> <span class="imgRight"><img src="../images/ARTP_thumb.jpg" width="112" height="100" alt="COPD Day at Vitalograph" /></span> <h2>Winter ARTP meeting well attended</h2> <p>Vitalograph recently attended the Association for Respiratory Technology and Physiology (ARTP) 3Oth Annual Conference at the Hilton Metropole Hotel in Brighton. <a href="/resources/industry_news/news_artp.html">More ...</a></p> </div> <div class="row"> <span class="imgLeft"><img src="../images/ATS-ERS_thumb.jpg" width="100" height="100" alt="ERS ATS Logo" /></span> <h2>New single set of standards for ERS and ATS</h2> <p>Through the combined efforts of the European Respiratory Society (ERS) and the American Thoracic Society (ATS), there is now a new single set of standards for both sides of the Atlantic. <a href="/resources/industry_news/news_ers_ats.html">More ...</a></p> </div> <div class="rowLast"> <span class="imgRight"><img src="../images/COPDdayoffice_thumb.jpg" width="99" height="98" alt="COPD Day at Vitalograph" /></span> <h2>Vitalograph participates World COPD Day</h2> <p>To mark World COPD Day on 16 November 2005, the British Lung Foundation teamed up with Superdrug to offer a free spirometry test at selected stores across the UK. <a href="/resources/industry_news/news_world_copd_day.html">More ...</a></p> </div> <p class="back"><a href="javascript:history.go(-1)">< Back</a></p> </div> css: Code: .imgLeft img { clear: none; float: left; margin: 0px 20px 10px 0px; border: 1px solid #000099; } .imgRight img { clear: none; float: right; margin: 0px 10px 10px 20px; border: 1px solid #000099; } /*rows*/ .row { padding-top: 10px; margin-top: 10px; border-top: 1px solid #3399FF; } .rowLast { padding-top: 10px; padding-bottom: 10px; margin-top: 10px; margin-bottom: 10px; border-top: 1px solid #3399FF; border-bottom: 1px solid #3399FF; } .line { border-bottom: 1px solid #3399FF; padding-top: 0px; padding-bottom: 10px; } .inline { display: inline; } #mainColumn { padding: 0px; margin-left: 175px; background-color: #FFFFFF; height: 100%; } /*industry news*/ #industry { padding-right: 20px; padding-left: 20px; } #industry h1 { margin-bottom: 20px; } #industry h2 { color: #000099; margin: 0px 0px 10px 0px; } #industry img { margin-bottom: 10px; } .copdDay img { clear: both; margin: 0px 40px 15px 55px; border: 1px solid #000099; } .artp { margin: 0px 40px 15px 40px; } .artp img { clear: both; margin: 0px 40px 15px 25px; border: 1px solid #000099; } Any suggestions on how to get this consistently since through css accounting for varying lengths of text?? I know I can adjust padding/margins for each section to make it work, but I want something that is more universal that I can always use to get the same appearance. Thanks! Hi everybody. I'm attempting to format video thumbnails horizontally across a page, and I'm experiencing some very weird behaviors. A bit of basic background on the site - this is a Drupal 5 site sporting a customized version of the "Lite Jazz" theme. XHTML & CSS are both valid. Basically, I just want to have the thumbnails scroll horizontally from left to right, then break and continue directly underneath. However, I am getting this odd "stair" effect in Firefox (for lack of a better way to put it). The alignment looks fine in IE, however in IE the thumbnail furthest to the right is squashed up against the side of the border. I have attached two screenshots to give you an idea. Below is a sample of the video thumbnail HTML that is output by Drupal and all (what I think is) all of the pertinent CSS styling. Additionally, I am aware that I can combine several of these CSS classes, so there is no literal need for multiple div tags, but these divs are generated by a short series of tpl files, and I don't think they are hurting anything. I could of course be wrong, but it would be hard to really consolidate them they way that the template is structures. Here's the HTML involved: Code: <div class="node"> <div class="content"><div class="video"> <a href="http://kathleenmackie.com/node/48"><img src="http://kathleenmackie.com/files/48_AtlantaFinal.jpg" alt="Watch this video!" /></a><br /> vid: 48<br /> type: video<br /> status: 1<br /> created: 1207090735<br /> </div></div> </div> <div class="node"> <div class="content"><div class="video"> <a href="http://kathleenmackie.com/node/47"><img src="http://kathleenmackie.com/files/47_FirefoxScreenSnapz003.jpg" alt="Watch this video!" /></a><br /> vid: 47<br /> type: video<br /> status: 1<br /> created: 1206652960<br /> </div></div> </div> <div class="node"> <div class="content"><div class="video"> <a href="http://kathleenmackie.com/node/45"><img src="/sites/all/modules/flashvideo/thumbnail_MIA.png" alt="thumbnail unavailable" /></a><br /> vid: 45<br /> type: video<br /> status: 1<br /> created: 1204256880<br /> </div></div> </div> And the CSS as well.... Code: .node { display: inline; padding: 5px 10px 10px; } .node .content, .comment .content { margin: 0; } .node .taxonomy { font-size: 0.8em; padding-left: 1.5em; } .node .picture { border: 1px solid #ddd; float: right; } .video { border: 1px solid #1e6730; background-color: #beff93; padding: 5px 10px 10px; clear: right; float: left; display: inline; margin: 15px; } #header, #content { width: 100%; } .node .content, .comment .content { margin: 0; I would include a bbcode link to the site, but apparently new users cannot do that (I suppose that makes sense from a spamming standpoint). Site is located at kathleenmackie.com. I also have screenshots from IE and Firefox detailing the problems, but again I apparently can't attach files or images (??). Thanks folks... hoping somebody has an idea or two. Again, I do have screenshots as well..... I am trying to space out my menu from the primary container. right now its completely on the left i am want to give it a 4 pixel space but I am relevantly new to css/html cant figure it out. This is what i have for the menu. Code: .twoColHybLtHdr #sidebar1 { float: left ; width: 12em; background: #000000; padding: 15px 0; border: 1px solid #ffffff; } Thanks In Advance Hi, This renders ok in firefox but not in IE, it places extra space between the elements. Can someone correct it for me please, i cant see where im going wrong. Thanks. the CSS: Code: #menu { margin: 0px; padding: 0px; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; } #menu ul { border: 0px; margin: 0px; padding: 0px; list-style-type: none; text-align: center; } #menu ul li { display: block; text-align: left; padding: 0px; margin: 0px; } #menu ul li a { border-top: none; border-bottom: 1px solid black; padding: 2px; margin: 0px; text-decoration: none; display: block; } #menu a:link, #menu a:visited { color: black; text-decoration: none; } #menu a:hover, #menu a:active { background-color: #fffed9; } the html: Code: <div id="menu"> <ul> <li><a href="#">item 1</a></li> <li><a href="#">item 2</a></li> <li><a href="#">item 3</a></li> <li><a href="#">item 4</a></li> <li><a href="#">item 5</a></li> </ul> </div> plug this in and view it in ie and you'll see what i mean. I am a photographer for a website and I know very little about anything other than basic html. With the website lady gone on a trip around the world for a year, I ended up being the person to attempt to modify our side menu to show an additional column of subcategories. I tinkered around with the code we had and I managed to get this to work in Firefox, however in IE7 the contents of the menu shift down a few pixels when you hover over a category. To view my problem, go to scannerparts.biz I've messed around with this for a few days and everything has become a big confusing mess so I have no choice but give in and ask for help. I thank anyone in advance for any assistance you can offer. -Emerson Here is the code: hover.css Code: <!-- body { behavior: url(/images/csshover2.htc); } div#categorynav ul {margin: 0px; padding: 0px;} .submenu { position: relative; margin: 0px; padding: 2px 0px; width: 178px; } div#categorynav ul.level1 li a { position: relative; display: block; text-decoration: none; margin: 0px; padding: 0px; } div#categorynav ul.level2 li { position: relative; display: block; text-decoration: none; margin: 0px; padding: 0px; } div#categorynav ul.level3 li { position: relative; display: block; text-decoration: none; margin: 0px; padding: 0px; } div#categorynav ul.level1 ul.level2 a { background-color: #000000; color: #fff; width: 178px; font-weight:normal; padding: 4px 4px 4px 14px; } div#categorynav ul.level2 ul.level3 a { background-color: #000000; color: #fff; width: 178px; font-weight:normal; padding: 4px 4px 4px 14px; } html>body div#categorynav ul.level1 ul.level2 a { width: auto; padding: 0px; margin: 0px; } html>body div#categorynav ul.level2 ul.level3 a { width: auto; padding: 0px; margin: 0px; } div#categorynav>ul a {width:auto; padding: 0px; margin: 0px;} div#categorynav ul ul {position: absolute; display: none; width: 100px; z-index:900; padding: 0px; margin: 0px;} div#categorynav ul ul li {padding: 0px; margin: 0px;} div#categorynav ul.level1 li.submenu:hover ul.level2 { display: block; list-style-image: none; list-style-type: none; } div#categorynav ul.level2 li.submenu:hover ul.level3 { display: block; list-style-image: none; list-style-type: none; } div#categorynav ul.level2 { top: 0px; left: 178px; margin: 0px; padding: 0px; width:160px; } div#categorynav ul.level2 li a:hover { background-color: #000000; color: red; } div#categorynav ul.level3 { top: 0px; left: 178px; margin: 0px; padding: 0px; width:160px; } div#categorynav ul.level3 li a:hover { background-color: #000000; color: red; } Abbreviated Header Source (abbreviated for max character requirement, I think I left all the vital stuff there) Code: <!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <ss:comment><link href="hover.css" type="text/css" rel="stylesheet" media="screen"/></ss:comment> <link href="$store.images['hover.css']" type="text/css" rel="stylesheet" media="screen"/> <style type="text/css"> <!-- /* Style Sheet */ body { margin-top: 10px; margin-right: 0px; margin-bottom: 30px; margin-left: 1px; background-image: url(/images/backgroundgray.jpg); background-repeat: repeat-x; background-position: center bottom; } html { height: 100%; margin-bottom: 1px; } #outline{ border :0px solid #ffffff; width :760px; } #categories{ background-color:#000000; color:#ffffff; text-decoration:none; text-align : left; display: block; padding : 5px 5px 1px 0px; font-weight :bold; font-size:9pt; font-family:<ss:value source=$font.paragraph.face/>; width :178px; padding: 0px; } #cat1{ background-color:#000000; color: #ffffff; text-decoration:none; text-align: left; display: block; font-weight :normal; font-size: 9pt; font-family:<ss:value source=$font.paragraph.face/>; width: 178px; padding: 0px; } #cat1 a{ background-color:#000000; color: #ffffff; text-decoration:none; text-align: left; display: block; font-weight: normal; font-size:9pt; font-family:<ss:value source=$font.paragraph.face/>; width :178px; padding: 0px; } #cat1 a:hover{ background-color:#000000; color:#ff0000; text-decoration:none; text-align : left; display: block; font-weight: normal; font-size:9pt; font-family:<ss:value source=$font.paragraph.face/>; width :178px; padding: 0px; } .leftnav { background-color:#000000; color:#ffffff; text-decoration:none; font-weight :bold; font-size:9pt; font-family:<ss:value source=$font.paragraph.face/>; padding : 2px 5px 1px 0px; } .leftnav A:link { background-color:#000000; border-bottom : 1px solid #666666; color:#ffffff; text-decoration:none; text-align : left; display: block; padding : 2px 5px 1px 0px; font-weight :bold; } .leftnav A:visited { background-color:#000000; border-bottom : 1px solid #666666; color:#ffffff; text-decoration:none; text-align : left; display: block; padding : 2px 5px 1px 0px; font-weight :bold; } .leftnav A:hover { background-color:#000000; border-bottom : 1px solid #666666; color:#ff0000; text-decoration:none; text-align : left; display: block; padding : 2px 5px 1px 0px; font-weight :bold; } .leftnav A:active { background-color:#000000; border-bottom : 1px solid #666666; color:#ffffff; text-decoration:none; text-align : left; display: block; padding : 2px 5px 1px 0px; font-weight :bold; } A:link {text-decoration:underline;color:<ss:value source=$font.paragraph.color/>;} A:visited {text-decoration:underline;color:<ss:value source=$font.paragraph.color/>;} A:hover {text-decoration:none;color:<ss:value source=$font.paragraph.color/>;} A:active {text-decoration:underline;color:<ss:value source=$font.paragraph.color/>;} .content {font-family:<ss:value source=$font.paragraph.face/> ;color:<ss:value source=$font.paragraph.color/>;} .title {font-size:10pt;font-weight:bold;font-family:<ss:value source=$font.paragraph.face/> ;color:#ffffff;} .footer {font-size:9pt;font-family:<ss:value source=$font.paragraph.face/> ;color:<ss:value source=$font.paragraph.color/>;} --> </style> </head> <body> <center> <div id="outline"> <table width="760" border="0" cellspacing="0" cellpadding="0"> <!-- banner image --> <tr valign="top"><td colspan="4"><a href="(URL address blocked: See forum rules)"><ss:image source="$templateSet.images['header.jpg']" border="0"/></a></td></tr> <tr valign="top"> <!-- left nav --> <td bgcolor="#000000"> </td> <td width="175" bgcolor="#000000"> <div class="leftnav"> <!-- store logo --> </div> <div class="leftnav"> <div style="border-bottom : 0px solid #666666;"> </div> <!-- home --> </div> <!-- categories --> <p><font face="Arial,Helvetica,sans-serif" size="2" color="white"><b>Parts and Products:</b></font></p> <div id="categorynav"> <div id="categories"> <ul class="level1"> <ss:foreach item="category" within="$catalog.categoryList()"> <ss:sortby item="categorypriority" direction="asc"/> <ss:if test="$category.treeLevel == '1'"> <ss:set name="hasSub" value="0"/> <ss:foreach item="subcategory" within="$category.childrenToDepth(1)"> <ss:set name="hasSub" value="1"/> </ss:foreach> <li class="submenu"> <div id="cat1"><ss:link source="$category"/></div> <ss:if test="$hasSub == '1'"> <ul class="level2"> <ss:foreach item="subcategory" within="$category.childrenToDepth(1)"> <ss:sortby item="categorypriority" direction="asc"/> <ss:if test="$category.treeLevel == '2'"> <ss:set name="hasSub" value="1"/> <ss:foreach item="subcategory" within="$category.childrenToDepth(1)"> <ss:set name="hasSub" value="1"/></ss:foreach></ss:if> </li> <li class="submenu"> <div id="cat1"><ss:link source="$subcategory"/></div> <ss:if test="$hasSub == '1'"> <ul class="level3"> <ss:foreach item="subcategory" within="$subcategory.childrenToDepth(1)"> <li><ss:link source="$subcategory" title="$subcategory.name"/></li> </ss:foreach> </ul> </ss:if> </ss:foreach> </ul> </ss:if></ss:foreach> </li> </ss:if></ss:if></ss:foreach> <br> </ul> </div> </div> I'm having some problems with CSS. If you look at the pictures below, the first is a screenshot of what it is supposed to look like. It's how it looks in most browsers. The second one, however, is how it looks in IE 6 on Windows and IE 5 on the Mac. It is wrong. Correct look Incorrect look I want to know how to fix this. The little colored boxes are supposed to be squares and have solid borders on them. The shape is off and the borders are missing on the IE version. Also, on the progress bar, there is not supposed to be space between the cells but there is. There is also space between every cell on the page and there is not supposed to be any. Here is my main CSS: Code: body { background-color: #FFFFFF; } a { text-decoration: none; font-weight: bold; } a:link { color: #003366; background-color: transparent; } a:visited { color: #003300; background-color: transparent; } a:active { color: #339933; background-color: transparent; } a:hover { text-decoration: underline; } table { border: 1px solid black; border-collapse: separate; border-spacing: 0px;} td, th { border: 0px solid black; padding: 5px; text-align: center; white-space: nowrap; } tr.one { background-color: #FFFFFF; } tr.two { background-color: #DDDDDD; } table.squares { border: 0px; border-spacing: 1px; width: 50px; height: 10px; } td.square { border: 1px solid grey; padding: 4px; } td.nopadding { padding: 0px; } .default { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 10px; color: #000000; } .h1 { font-size: 200%; font-weight: bold; text-align: center;} .h2 { font-size: 120%; font-weight: bold; } .h3 { font-weight: bold; } .step { font-size: 150%; font-weight: bold; color: #999999; } Here is one of the sets of squares: Code: <table class="squares"> <tr> <td class="square" style="background-color: #CCCC66"></td> <td class="square" style="background-color: #CC9966"></td> <td class="square" style="background-color: #990000; border: black"><td> <td class="square" style="background-color: #669966"></td> <td class="square" style="background-color: #669999"></td> </tr> </table> And finally, here is one of my progress bars: Code: <table style="color: white; width: 100px"> <tr> <td style="padding:0px; text-align: right; padding-right: 5px; background-color:#222244; width:41px"></td> <td style="padding:0px; text-align: left; padding-left: 5px; background-color:#666666; width:59px">40.7%</td> </tr> </table> And in case that code is not enough, here is a link to the full HTML. According to this CSS test my CSS is not wrong. So does IE just suck? Is there something I can do to make it work in all browsers? My last question is, should I be using div tags for my boxes and progress bars instead of tables? I couldn't figure out how to make them work with divs so I just went with what I knew. Could someone give me an example of each using divs so I can learn how to make it work? I want to make it so that when you go to type something into the textbox(lastname or firstname) the menu stays open. right now if you try and type something into the textbox the menu closes but you still keep right on writing and then go back into the menu and click the submit button. I also want it so that you can press the <enter> key on your keyboard and it will submit the search query that you are working on. if there is a better way of doing this all please let me know this is menu.php PHP Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>BHI and Roth's Website menu</title> <?php <link rel="stylesheet" type="text/css" href="menu_css.css" /> </head> <BODY STYLE="background-color:transparent"> <ul class="pureCssMenu pureCssMenum"> <li class="pureCssMenui"><a class="pureCssMenui" href="home.php" target="showframe">Home</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="#"><span>Fill-in a form</span><![if gt IE 6]></a><![endif]><!--[if lte IE 6]><table><tr><td><![endif]--> <ul class="pureCssMenum"> <li class="pureCssMenui"><a class="pureCssMenui" href="form_bhi_hoac.php" target="showframe">102HOAC</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="form_for_adding_email_addresses.php" target="showframe">Email database</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="form_support_application.php" target="showframe">Support Application</a></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--></li> <li class="pureCssMenui"><a class="pureCssMenui" href="#"><span>View the form data</span><![if gt IE 6]></a><![endif]><!--[if lte IE 6]><table><tr><td><![endif]--> <ul class="pureCssMenum"> <li class="pureCssMenui"><a class="pureCssMenui" href="view_102hoac.php" target="showframe">102HOAC</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="#"><span>Search Addressbook by:</span><![if gt IE 6]></a><![endif]><!--[if lte IE 6]><table><tr><td><![endif]--> <ul class="pureCssMenum"> <li class="pureCssMenui"><a class="pureCssMenui" href="#"><span>Last Name:</span><![if gt IE 6]></a><![endif]><!--[if lte IE 6]><table><tr><td><![endif]--> <ul class="pureCssMenum"> <li class="pureCssMenui"><form class="pureCssMenui" action="lastname_search.php" method="post" target="showframe"><input type="text" name="lastname" size="30" /><input type="submit" align="right" value="Search" /></form></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--></li> <li class="pureCssMenui"><a class="pureCssMenui" href="#"><span>First Name:</span><![if gt IE 6]></a><![endif]><!--[if lte IE 6]><table><tr><td><![endif]--> <ul class="pureCssMenum"> <li class="pureCssMenui"><form class="pureCssMenui" action="firstname_search.php" method="post" target="showframe"><input type="text" name="firstname" size="30" /><input type="submit" align="right" value="Search" /></form></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--></li> </ul> <li class="pureCssMenui"><a class="pureCssMenui" href="sa.php" target="showframe">Support Application</a></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--></li> <li class="pureCssMenui"><a class="pureCssMenui" href="#"><span>Resources</span><![if gt IE 6]></a><![endif]><!--[if lte IE 6]><table><tr><td><![endif]--> <ul class="pureCssMenui"> <li class="pureCssMenui"><a class="pureCssMenui" href="#"><span>View BHI Brochure -></span><![if gt IE 6]></a><![endif]><!--[if lte IE 6]><table><tr><td><![endif]--> <ul class="pureCssMenum"> <li class="pureCssMenui"><a class="pureCssMenui" href="bhi_brochure_feb_08.pdf" target="_blank">in .pdf format</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="bhi_brochure_feb_08.swf" target="_blank">in .swf format</a></li> </ul> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--></li> <li class="pureCssMenui"><a class="pureCssMenui" href="gallery.html" target="showframe">Photo Gallery</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="edit.php" target="showframe">Edit account information</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="logout.php" target="_top">Logout</a></li> </ul> </body> </html> <?php } } } else //if the cookie does not exist, they are taken to the login screen { header("Location: login.php"); } ?> </html> And this is menu_css.css Code: #pcm{display:none;} ul.pureCssMenu ul{display:none} ul.pureCssMenu li:hover>ul{display:block} ul.pureCssMenu ul{position: absolute;left:0px;top:100%;} ul.pureCssMenu ul ul{position: absolute;left:100%;top:0px;} ul.pureCssMenu,ul.pureCssMenu ul { margin:0px; list-style:none; padding:0px 2px 2px 0px; background-color:#990033; background-repeat:repeat; border-color:#FFEE00; border-width:1px; border-style:solid; } ul.pureCssMenu table {border-collapse:collapse}ul.pureCssMenu { display:block; zoom:1; float: left; } ul.pureCssMenu ul{ width:210px;/*width:138.6px;*/ } ul.pureCssMenu li{ display:block; margin:2px 0px 0px 2px; font-size:0px; } ul.pureCssMenu a:active, ul.pureCssMenu a:focus { outline-style:none; } ul.pureCssMenu a, ul.pureCssMenu li.dis a:hover, ul.pureCssMenu li.sep a:hover { display:block; vertical-align:middle; background-color:#990033; border-width:0px; border-color:#990033; border-style:solid; text-align:center; text-decoration:none; padding:4px; _padding-left:4; font:normal 11.5px Verdana; color: #FFEE00; text-decoration:none; cursor:default; } ul.pureCssMenu span{ overflow:hidden; } ul.pureCssMenu li { float:left; } ul.pureCssMenu ul li { float:none; } ul.pureCssMenu ul a { text-align:left; white-space:nowrap; } ul.pureCssMenu li.sep{ text-align:center; padding:0px; line-height:0; height:100%; } ul.pureCssMenu li.sep span{ float:none; padding-right:0; width:5; height:16; display:inline-block; background-color:#BB99BB; background-image:none; } ul.pureCssMenu ul li.sep span{ width:80%; height:3; } ul.pureCssMenu li:hover{ position:relative; } ul.pureCssMenu li:hover>a{ background-color:#FFEE00; border-color:#0099cc; border-style:solid; font:normal 11.5px Verdana; color: #990033; text-decoration:none; } ul.pureCssMenu li a:hover{ position:relative; background-color:#FFEE00; border-color:#990033; border-style:solid; font:normal 11.5px Verdana; color: #990033; text-decoration:none; } ul.pureCssMenu li.dis a { color: #AAAAAA !important; } I've never used CSS to make a menu before so i used an online maker @ purecssmenu.com, unfortunately they don't appear to have a decent support forum or any means of emailing them. I'm having a small problem putting the menu in to my site. The banner image for the site is 800px. When i put the menu in its not wide enough and i can't see a way of making it fit. Also i'm using a table to position it. When its positioned to the left there seems to be some padding or somthing making it not align up with the banner image. It appears to be 1 or 2px short. The style for the menu is... Code: #pcm{display:none;} ul.pureCssMenu ul{display:none} ul.pureCssMenu li:hover>ul{display:block} ul.pureCssMenu ul{position: absolute;left:-1px;top:98%;} ul.pureCssMenu ul ul{position: absolute;left:98%;top:-2px;} ul.pureCssMenu,ul.pureCssMenu ul { margin:0px; list-style:none; padding:0px 2px 2px 0px; background-color:#000000; background-repeat:repeat; border-color:#808080; border-width:1px; border-style:solid; } ul.pureCssMenu table {border-collapse:collapse}ul.pureCssMenu { display:block; zoom:1; height:21px; float: left; } ul.pureCssMenu ul{ width:225.75px; } ul.pureCssMenu li{ display:block; margin:2px 0px 0px 2px; font-size:0px; } ul.pureCssMenu a:active, ul.pureCssMenu a:focus { outline-style:none; } ul.pureCssMenu a, ul.pureCssMenu li.dis a:hover, ul.pureCssMenu li.sep a:hover { display:block; vertical-align:middle; background-color:#000000; border-width:1px; border-color:#000000; border-style:solid; text-align:center; text-decoration:none; padding:2px 5px 5px 10px; _padding-left:0; font:normal 11px Tahoma; color: #ffde00; text-decoration:none; cursor:default; } ul.pureCssMenu span{ overflow:hidden; } ul.pureCssMenu li { float:left; } ul.pureCssMenu ul li { float:none; } ul.pureCssMenu ul a { text-align:left; white-space:nowrap; } ul.pureCssMenu li.sep{ text-align:left; padding:0px; line-height:0; height:100%; } ul.pureCssMenu li.sep span{ float:none; padding-right:0; width:3px; height:100%; display:inline-block; background-color:#808080; background-image:none;} ul.pureCssMenu ul li.sep span{ width:100%; height:3px; } ul.pureCssMenu li:hover{ position:relative; } ul.pureCssMenu li:hover>a{ background-color:#ffde00; border-color:#000000; border-style:solid; font:normal 11px Tahoma; color: #000000; text-decoration:none; } ul.pureCssMenu li a:hover{ position:relative; background-color:#ffde00; border-color:#000000; border-style:solid; font:normal 11px Tahoma; color: #000000; text-decoration:none; } ul.pureCssMenu li.dis a { color: #557D4F !important; } ul.pureCssMenu img {border: none;float:left;_float:none;margin-right:2px;width:16px; height:16px; } ul.pureCssMenu ul img {width:16px; height:16px; } ul.pureCssMenu img.over{display:none} ul.pureCssMenu li.dis a:hover img.over{display:none !important} ul.pureCssMenu li.dis a:hover img.def {display:inline !important} ul.pureCssMenu li:hover > a img.def {display:none} ul.pureCssMenu li:hover > a img.over {display:inline} ul.pureCssMenu a:hover img.over,ul.pureCssMenu a:hover ul img.def,ul.pureCssMenu a:hover a:hover ul img.def,ul.pureCssMenu a:hover a:hover img.over,ul.pureCssMenu a:hover a:hover a:hover img.over{display:inline} ul.pureCssMenu a:hover img.def,ul.pureCssMenu a:hover ul img.over,ul.pureCssMenu a:hover a:hover ul img.over,ul.pureCssMenu a:hover a:hover img.def,ul.pureCssMenu a:hover a:hover a:hover img.def{display:none} ul.pureCssMenu a:hover ul,ul.pureCssMenu a:hover a:hover ul{display:block} ul.pureCssMenu a:hover ul ul{display:none} ul.pureCssMenu span{ display:block; background-image:url(./images/arrv_white.gif); background-position:right center; background-repeat: no-repeat; padding-right:9px;} ul.pureCssMenu ul span{background-image:url(./images/arr_black.gif)} ul.pureCssMenu ul li:hover > a span{ background-image:url(./images/arr_white.gif);} ul.pureCssMenu table a:hover span,ul.pureCssMenu table a:hover a:hover span{background-image:url(./images/arr_white.gif)} ul.pureCssMenu table a:hover table span{background-image:url(./images/arr_black.gif)} ul.pureCssMenu li.pureCssMenui0 { width:110px; height:23px; } ul.pureCssMenu li a.pureCssMenui0{ height:100%; background-image:url(./images/btn3.jpg); border-width:0px; font:normal 11px Tahoma; color:#fff; } ul.pureCssMenu li a.pureCssMenui0:hover{ background-image:url(./images/btn4.jpg); font:normal 11px Tahoma; color:#eee; } ul.pureCssMenum0 { background-color:transparent; border-width:0px; padding:0px 0px 0px 0px; } ul.pureCssMenum0>li>a { padding:8px 10px 0px 10px; } ul.pureCssMenum0 a { padding:8px 10px 0px 10px; } ul.pureCssMenum0 ul a { padding:2px 5px 5px 10px; } ul.pureCssMenum0>li { margin:0px 0px 0px 0px; } ul.pureCssMenum0 li { margin:0px 0px 0px 0px; } ul.pureCssMenum0 li li { margin:2px 0px 0px 2px; } </style> <!-- End PureCSSMenu.com STYLE --> And the html for the site is... Code: <!-- Start PureCSSMenu.com MENU --> <ul class="pureCssMenu pureCssMenum0"> <li class="pureCssMenui0"><a class="pureCssMenui0" href="/index.html">Home</a></li> <li class="pureCssMenui0"><a class="pureCssMenui0" href="#"><span>About Us</span><![if gt IE 6]></a><![endif]><!--[if lte IE 6]><table><tr><td><![endif]--> <ul class="pureCssMenum"> <li class="pureCssMenui"><a class="pureCssMenui" href="/news.html">News & Events</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/promotions.html">Promotions</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/distribution.html">Distribution Network</a></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--></li> <li class="pureCssMenui0"><a class="pureCssMenui0" href="#"><span>Services</span><![if gt IE 6]></a><![endif]><!--[if lte IE 6]><table><tr><td><![endif]--> <ul class="pureCssMenum"> <li class="pureCssMenui"><a class="pureCssMenui" href="/service.html">Service</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/delivery.html">Delivery</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/m2m.html">Made to Measure</a></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--></li> <li class="pureCssMenui0"><a class="pureCssMenui0" href="#"><span>Products</span><![if gt IE 6]></a><![endif]><!--[if lte IE 6]><table><tr><td><![endif]--> <ul class="pureCssMenum"> <li class="pureCssMenui"><a class="pureCssMenui" href="/linings.html">Linings</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/blackouts.html">Blackouts</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="#"><span>Interlinings</span><![if gt IE 6]></a><![endif]><!--[if lte IE 6]><table><tr><td><![endif]--> <ul class="pureCssMenum"> <li class="pureCssMenui"><a class="pureCssMenui" href="/interlining.html">Interlining</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/wadding.html">Wadding</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/2fold.html">2 Fold</a></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--></li> <li class="pureCssMenui"><a class="pureCssMenui" href="accessories.html">Accessories</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="#"><span>Blind Systems</span><![if gt IE 6]></a><![endif]><!--[if lte IE 6]><table><tr><td><![endif]--> <ul class="pureCssMenum"> <li class="pureCssMenui"><a class="pureCssMenui" href="/bsm2m.html">M2M & Component</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/setsize.html">Set Size & Open Rail</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/motorisedbs.html">Motorised</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/bsaccessories.html">Accessories</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/bslinings.html">Linings</a></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--></li> <li class="pureCssMenui"><a class="pureCssMenui" href="#"><span>Curtain Tracks</span><![if gt IE 6]></a><![endif]><!--[if lte IE 6]><table><tr><td><![endif]--> <ul class="pureCssMenum"> <li class="pureCssMenui"><a class="pureCssMenui" href="/easyflow.html">Easy Flow</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/trackservices.html">Track Services</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/handdrawn.html">Hand Drawn</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/corded.html">Corded</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/motorised.html">Motorised</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/panelsystem.html">Panel System</a></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/metalpoles.html">Metal Poles</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/woodenpoles.html">Wooden Poles</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="#"><span>Contract</span><![if gt IE 6]></a><![endif]><!--[if lte IE 6]><table><tr><td><![endif]--> <ul class="pureCssMenum"> <li class="pureCssMenui"><a class="pureCssMenui" href="/contractlinings.html">Contract Linings</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/contractfabrics.html">Contract Fabrics</a></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/bamboo.html">Bamboo Fabrics</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/cushions.html">Cushions & Duvets</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/upholstery.html">Upholstery</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/printing.html">Printing</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/irishlinen.html">Irish Linen, Garment Linings & Interlinings</a></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--></li> <li class="pureCssMenui0"><a class="pureCssMenui0" href="#"><span>Contact Us</span><![if gt IE 6]></a><![endif]><!--[if lte IE 6]><table><tr><td><![endif]--> <ul class="pureCssMenum"> <li class="pureCssMenui"><a class="pureCssMenui" href="/general.html">General Enquiries</a></li> <li class="pureCssMenui"><a class="pureCssMenui" href="/newenquiries.html">New Enquiries</a></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--></li> <li class="pureCssMenui0"><a class="pureCssMenui0" href="/orders.html">Orders</a></li> </ul> <a id="pcm" href="http://www.purecssmenu.com/">CSS Drop Down Menu by PureCSSMenu.com</a> <!-- End PureCSSMenu.com MENU --> <!-- (c) 2009, PureCSSMenu.com --> If anyone can help me make this 800px wide even if it means having a blank image at the end to fill any space and help removing any padding thats making it not appear full width it would be much appreciated. I have a vertical CSS menu using lists on my website. Everything looks ok when the page is first loaded but when I click on one of the menu items the left edge of the menu shifts to the left making the entire menu 10px wider. The div containung the menu has a left value of 10px but this seems to be ignored or overwritten when I click on a menu item. The right edge of the menu does not change. If I refresh the page it appears correctly again. Any ideas? Im relatively new to CSS and im trying to make a navigation menu. I've been able to gather some code from other tutorials and finally got one that works fine under firefox 3.5, Opera 9 and IE8. However i've been told that its not working properly under IE7. Can anyone tell me if theres a fix for this? i've searched around other tutorials but couldnt make sense of them (which is probably why the CSS is a bit messy). Anyhelp would be greatly appreciated. link: users.tpg.com.au/tetsuo/css_help/index.html CSS: users.tpg.com.au/tetsuo/css_help/awis.css hey all, I have been working on a multilevel suckerfish menu tutorial and i have the following: http://www.wildhosting.co.uk/cssMenu/menu.php However, i am having a couple of final problems. 1) In FF the grey highlight colour does not seem to fill from top to bottom on the main menu. 2) In FF, When a sub menu (for the top option of the menu) appears the top border of the submenu overlaps the bottom border of the main menu. 3) In IE, the above are ok but the submenu appears a long way from where it should, ie 5cm to the right... any help would be great, thanks RF Hi I have been working on this all day, and am starting to see double This site plays nice on all browsers except IE , the top menu that is lastchancemusic.gr/testing/ could anyone please help Hey guys, I'm trying to aling my menu in my new website. I'm trying to align the buttons on the bottom of the dark div on the top of the page. Its not working at all, and FF en IE are showing different stuff: So, in both browsers, I cant get it to work. I want the two buttons to be aligned on the bottom of the dark part, like tabs. Next to eachother. Any (bright) ideas? Thanks! This is the complete code I'm using: html Code: Original - html Code <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <style> .shadowbox {margin-bottom:4px;background: #dfdfdf; border: 1px solid #f5f5f5; position: relative;top: 2px;left: 2px;} .lightyellow {padding:10px;background: #FFFFCC;border: 1px solid #B6B6B6;color: #242424;} .shadowbox div.normal {position: relative;top: -2px;left: -2px;} #content {width: 90%; margin-top: 15px; padding: 15px; margin-left: 5%; background: #FFFFFF; border: 1px solid #000000; text-align: left;} #header {margin: 0px; padding: 0px; padding-left: 5%; background: #333333; height: 65px; text-align: left; } #logo { padding-top: 10px} body {padding: 0px; margin: 0px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size:80%; background-image: url('images/back.gif'); background-repeat: repeat; } h1 { font-size: 150%; padding: 0px; margin: 0px; padding-bottom: 5px; padding-left: 2px; } #copyright { text-align: center; font-size: 10px; margin-top: 25px; color: #7D7D7D; } </style> </HEAD> <BODY> <div id='header'> <div id='logo'> <img src='images/logo.png' alt='InvenI'> </div> <img src='images/zoeken_inactive.gif'> <img src='images/zoeken_inactive.gif'> </div> <div id='content'> <h1>Mijn Verlanglijstje</h1> <div class='shadowbox'> <div class='normal lightyellow'> hoiii<br /><br />hoiii<br /><br />hoiii<br /><br />hoiii<br /><br /> </div> </div> <div class='shadowbox'> <div class='normal lightyellow'> hoiii<br /><br />hoiii<br /><br />hoiii<br /><br />hoiii<br /><br /> </div> </div> </div> <div id='copyright'> Geen enkele advertentie wordt gehost op InvenI, InvenI is dus ook niet verantwoordelijk voor hun inhoud.<br /> InvenI.nl is niet verantwoordelijk voor (gevolg)schade ontstaan door het gebruik van deze site.<br /> Geregistreerde namen zijn eigendom van hun eigenaren.<br /> Meer informatie over uw Privacy.<br /> </div> </BODY> </HTML> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <style> .shadowbox {margin-bottom:4px;background: #dfdfdf; border: 1px solid #f5f5f5; position: relative;top: 2px;left: 2px;} .lightyellow {padding:10px;background: #FFFFCC;border: 1px solid #B6B6B6;color: #242424;} .shadowbox div.normal {position: relative;top: -2px;left: -2px;} #content {width: 90%; margin-top: 15px; padding: 15px; margin-left: 5%; background: #FFFFFF; border: 1px solid #000000; text-align: left;} #header {margin: 0px; padding: 0px; padding-left: 5%; background: #333333; height: 65px; text-align: left; } #logo { padding-top: 10px} body {padding: 0px; margin: 0px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size:80%; background-image: url('images/back.gif'); background-repeat: repeat; } h1 { font-size: 150%; padding: 0px; margin: 0px; padding-bottom: 5px; padding-left: 2px; } #copyright { text-align: center; font-size: 10px; margin-top: 25px; color: #7D7D7D; } </style> </HEAD> <BODY> <div id='header'> <div id='logo'> <img src='images/logo.png' alt='InvenI'> </div> <img src='images/zoeken_inactive.gif'> <img src='images/zoeken_inactive.gif'> </div> <div id='content'> <h1>Mijn Verlanglijstje</h1> <div class='shadowbox'> <div class='normal lightyellow'> hoiii<br /><br />hoiii<br /><br />hoiii<br /><br />hoiii<br /><br /> </div> </div> <div class='shadowbox'> <div class='normal lightyellow'> hoiii<br /><br />hoiii<br /><br />hoiii<br /><br />hoiii<br /><br /> </div> </div> </div> <div id='copyright'> Geen enkele advertentie wordt gehost op InvenI, InvenI is dus ook niet verantwoordelijk voor hun inhoud.<br /> InvenI.nl is niet verantwoordelijk voor (gevolg)schade ontstaan door het gebruik van deze site.<br /> Geregistreerde namen zijn eigendom van hun eigenaren.<br /> Meer informatie over uw Privacy.<br /> </div> </BODY> </HTML> I've got a drop down menu that has a hover feature. Problem is that as soon as you try to mouse over the options in the menu after they pop up on the hover on the title of the menu, the menu disappears. it does this in FF and Safari but in IE it works. weird, eh? any ideas? Hey, I have a drop down menu that when i view it in Internet Explorer is aligned fine but isnt working properly in firefox. I think the problem lies in the white spaces either side of the page. If the page fits the screen snug there isn't an alignment problem, this is better explained when viewing the site on different resolutions. I'm pretty sure the problem lies in the css but i don't know enough pinpoint it. I can't post the address on the forum because of the rules but its www northsidestageschool com (where spaces are dots). Sorry if this breaks rules but my problem really doesn't make any sense with out the link! Any ideas? Mike hi all! so i'm working on a redesign of our corporate site but i'm having a few problems with this menu i'm coding. http://washsq.com/test/index.html if you take a look at this there are 3 problems i can't seem to fix, no matter what i try. 1. why does the padding each menu button extend over the border for the entire div? 2. how can i get the gap between each button to be 0? 3. how can i float this entire menu to the right of the div? i've tried a lot but nothing seems to work. thanks! |