1. This website uses cookies. By continuing to use this website you are giving consent to cookies being used.
    For information on cookies and how you can disable them visit our Cookie Usage page.
    Dismiss Notice

CSS Remove separation line in menu

Discussion in 'Web Development' started by norD, Feb 18, 2010.

  1. norD

    norD New Member

    Hi all,

    Please help me how to remove last separation line in menu as marked in picture.

    [​IMG]

    Thanks in advance!
    norD
     
  2. ishkey

    ishkey Moderator, Logos, Sports Crests Staff Member Verified Member

    one separation coming up - your welcome in advance
     

    Attached Files:

  3. norD

    norD New Member

    Thanks... I would like to remove it from menu code. What is proper config there?
     
  4. ishkey

    ishkey Moderator, Logos, Sports Crests Staff Member Verified Member

    How would we know - you asked for a graphic file to be edited - so it was edited with a graphics program.
     
  5. norD

    norD New Member

    Thanks....
     
  6. ishkey

    ishkey Moderator, Logos, Sports Crests Staff Member Verified Member

    Your welcome -
    Maybe if you rephrase your question with some information in it, someone might be able to help you.
     
  7. norD

    norD New Member

    The image above is taken from my website. This is a button in the menu. When updated, I added this new button to my template.

    Problem is that I cannot remove the last separation vertical line from design. It is a CSS HTML. When change button width this last one drop down to next row if I go too wide.

    Any idea to resolve this?

    Thanks,
    norD
     
  8. ishkey

    ishkey Moderator, Logos, Sports Crests Staff Member Verified Member

    Without see the code it's hard to tell but;
    it could be a gif or a jpg file which is listed in the css file under the menu area.
    the width problem is probably do to either a fixed with for the menu in the css file or you have reached the end of that line so it wraps around and drops down.
    all of it looks like you have to look in the css file.

    When I'm editing, I start by looking at the code in the index.html file for area of concern like
    <div id="header"> or <ul id="nav"> or <ul id="menu"> and I look at the code around it. I'll look at the webpage and back at the code. Which by then I can usually tell where to look in the css file.
    In the css file I look for #header { or #nav { or #menu {
    Then I just snoop around the code. I will change one thing and see how it looks on the webpage. I always keep a backup or the original.
     
  9. norD

    norD New Member

    Please have a look at the code:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <!--
    Design by Free CSS Templates
    Download free CSS templates - Free CSS Templates
    Released for free under a Creative Commons Attribution 2.5 License
    Name : Bamboo
    Description: A two-column, fixed-width design with dark color scheme.
    Version : 1.0
    Released : 20090820
    -->
    <html xmlns="XHTML namespace">
    <head>
    <link rel="shortcut icon" href="http://www.3leaves-label.com/favicon.ico" >
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>3LEAVES //sound adventures at your home</title>
    <link href="style.css" rel="stylesheet" type="text/css" media="screen" />
    </head>
    <body>
    <div id="wrapper">
    <div id="header-wrapper">
    <div id="header">
    <div id="logo">
    <h1><a href="#">3leaves </a></h1>
    <p> //sound adventures at your home</p>
    </div>
    </div>
    </div>
    <!-- end #header -->
    <div id="menu">
    <ul>
    <li class="current_page_item"><a href="index.html">Home</a></li>
    <li><a href="artists.html">Artists</a></li>
    <li><a href="releases.html">Releases</a></li>
    <li><a href="distribution.html">Distribution</a></li>
    <li><a href="press.html">Press</a></li>
    </ul>
    <ul>
    <li><a href="http://3leaves-label.com/zen_cart/">Webshop</a></li>
    </ul>
    </div>
    <!-- end #menu -->
    <div id="page">
    <div id="page-bgtop">
    <div id="page-bgbtm">
    <div id="content">
    <div class="post">
    <h3 class="title"><a href="#">NEW RELEASE IS OUT!</a></h3>
    <p class="meta">Posted by <a href="mailto:info@3leaves-label.com" target="_blank">Ákos Garai</a> on 15th February, 2010 </p>
    <div class="entry">
    <p align="left">We are proud to announce our second release <strong>Habitats</strong> by German artist, founder member of the <a href="Gruenrekorder" target="_blank">Gruenrekorder</a> label <em>Lasse-Marc Riek</em>. </p>
    <p align="left">The edition contains two discs: one for audio composition that opens with Riek's introductory spoken word, and the other, which presents <strong>Habitats from Finland</strong>, a slideshow video that based on photographs by <em>Anne-Berit Riek</em>.</p>
    <p align="left">Artwork printed in B6 size folded sleeve. 150 hand-numbered copies was manufactured. </p>
    <p align="left">We are present you the release packaged in crystal clear sealable Daiso bag with great pleasure. For further details please see page &quot;Releases', if you wish to order, drop around our <strong>Webshop</strong>.</p>
    </div>
    </div>
    </div>
    <!-- end #content -->
    <!-- end #sidebar -->
    <div style="clear: both;"></div>
    </div>
    </div>
    </div>
    <!-- end #page -->
    </div>
    <div id="footer-wrapper">
    <div id="footer">
    <p>(c) 2010 3leaves-label.com. powered by <a href="http://www.hosting24.com">hosting24.com</a>. Design based on <a href="Download free CSS templates - Free CSS Templates" target="_blank">Free CSS Templates</a>.</p>
    </div>
    <!-- end #footer -->
    </div>
    </body>
    </html>
     
  10. ishkey

    ishkey Moderator, Logos, Sports Crests Staff Member Verified Member

    rough guess look at
    Code:
    #menu a {
    	display: block;
    	height: 18px;
    	[COLOR="Blue"]background: url(images/img06.jpg) no-repeat right 10px;[/COLOR]
    	text-decoration: none;
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 12px;
    	font-weight: normal;
    	color: #FFFFFF;
    	border: none;
    	padding-top: 12px;
    	padding-right: 27px;
    	padding-bottom: 12px;
    	padding-left: 27px;
    	margin: 3px;
    }
    your width problem
    Code:
    #header {
    	width: 640px;
    
    
    #menu {
    	width: 640px;
    
    
    #content {
    	float: left;
    	width: 600px;
     
  11. norD

    norD New Member

    600px is purposive and affects only text box width. Problem is with menu button.
     
  12. ishkey

    ishkey Moderator, Logos, Sports Crests Staff Member Verified Member

    If you want to remove the last separation line, image below, then you will have to re-write the css code and add a graphic for each menu item.
    or
    live with it or take it out completely.
     

    Attached Files:

  13. norD

    norD New Member

    Hm... will decide which is best for me. Thanks for your help and assist.
     
  14. ishkey

    ishkey Moderator, Logos, Sports Crests Staff Member Verified Member

    An easier way to have solved this problem - in case anyone got confused or turned around.
    Reference the graphic below -
    Problem: "Remove separation line in menu" which was done, even though those files didn't exist in the template- but what was really wanted was the last separation line gone.

    This is how one would try to figure out the problem ---
    If you look at the page as viewed in your browser (menu shown below) and looked at the "Images" directory, you would see the two marked images below, img03 and img06 are the only images that maybe part of the menu system.

    Next you need to look at the code in the index.html file and you find "menu" and a unordered list - which means you can change the menu selections on the fly, just by typing a new word. No graphics here, so you comment out the "Contact" line just to see what happens and view it in your browser. That didn't work.

    Where are those 2 img files. Open the style.css file and you find then in, where else, the /* Menu */ section.
    If you comment out the first line which contains, img03.jpg, save the file and view it in your browser you find there is no-longer a long red line, but the separation bars are still there.
    Undo what you just did and now comment out the line with, img03.jpg - all the separation bars are gone.

    Now you know partially how the css file works generating the menu and you would have to say to yourself, I need to work in the menu part to alter it, so there is no end separation. You might even have to add few extra graphics just to make it work.

    Hope this helps, I know it helped me, even if it meant typing out this post.
    You can find the origanial template here Bamboo

    Code:
    [COLOR="Red"]INDEX.HTML[/COLOR]
    <div id="menu">
    		<ul>
    			<li class="current_page_item"><a href="#">Home</a></li>
    			<li><a href="#">Blog</a></li>
    			<li><a href="#">Photos</a></li>
    			<li><a href="#">About</a></li>
    			<li><a href="#">Links</a></li>
    			<li><a href="#">Contact</a></li>
    		</ul>
    	</div>
    	<!-- end #menu -->
    Code:
    [COLOR="#ff0000"]STYLE.CSS[/COLOR]
    /* Menu */
    
    #menu {
    	width: 960px;
    	height: 40px;
    	margin: 0 auto;
    	padding: 0;
    	background: url(images/img03.jpg) repeat-x left top; 
    }
    #menu ul {
    	margin: 0;
    	padding: 0px 0px 0px 25px;
    	list-style: none;
    	line-height: normal;
    }
    #menu li {
    	float: left;
    }
    #menu a {
    	display: block;
    	height: 18px;
    	margin-right: 3px;
    	padding: 12px 40px 0px 40px;
    	background: url(images/img06.jpg) no-repeat right 10px;
    	text-decoration: none;
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 12px;
    	font-weight: normal;
    	color: #FFFFFF;
    	border: none;
    }
    #menu a:hover, #menu .current_page_item a {
    }
    #menu .current_page_item a {
    	padding-left: 0;
    }
    #menu a:hover {
    	text-decoration: underline;
    }
    
     

    Attached Files:

    • dumb.jpg
      dumb.jpg
      File size:
      27.9 KB
      Views:
      615
  15. norD

    norD New Member

    Thank you so much for taking your time with this issue and posted this helpful reply.

    I followed your steps and it worked! Also, I found that if I simply delete img06.jpg file from images folder, bingo, all separations dissapear because there is no graphics behind the code. It worked without editing CSS though I think it is better to remove unused lines.

    I am amateur but I like to learn new things and when you know "how it works", you can go ahead. Thank you ishkey - it was a good lesson for me and I hope for others as well.

    However, I got another trick how to solve this last separation problem. It says that I need to put an id on the last element on the menu and suppress the border, but actually I do not know how to "suppress the border". Suppress is a command line by chance?

    Thanks again,
    Ákos
     
  16. ishkey

    ishkey Moderator, Logos, Sports Crests Staff Member Verified Member

    No you don't... You didn't give the proper information to hotscripts to solve the problem. All you did was post the same question there and here.

    The :first-child pseudo class means "if this element is the first child of its parent". :last-child means "if this element is the last child of its parent". Note that only element nodes (HTML tags) count, these pseudo-classes ignore text nodes.

    Code:
    div#test p:first-child {text-decoration: underline;}
    div#test p:last-child {color: red;}
    
    Result:
    Try to understand - you are working with a block (code below) which repeats itself for every menu selection you have.
    Your options are; Re-write the entire menu section or live with it.
    Code:
    #menu a {
    	display: block;
    	height: 18px;
    	margin-right: 3px;
    	padding: 12px 40px 0px 40px;
    	background: url(images/img06.jpg) no-repeat right 10px;
    	text-decoration: none;
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 12px;
    	font-weight: normal;
    	color: #FFFFFF;
    	border: none;
    }