Closed Thread
Results 1 to 4 of 4

Thread: [CSS]Making menu with line

  1. #1
    galaxyAbstractor's Avatar
    galaxyAbstractor is offline Community Advocate galaxyAbstractor is on a distinguished road
    Join Date
    Oct 2007
    Location
    Land of Null and Insanity
    Posts
    5,495

    [CSS]Making menu with line



    I want the links and lines to be in one line as an menu but I'm clearly not suceeded... Any ideas?

    This is the code I am using:

    HTML Code:
    <div class="menuleft">
    <a href="#">Link1</a><div class="line"><img src="images/line.png" alt="" /></div><a href="#">link2</a><div class="line"><img src="images/line.png" alt="" /></div>
    </div>
    The CSS:

    HTML Code:
    .menuleft {
    margin-top:-32px;
    padding-left:100px;
    width:100%;
    
    }
    .line {
    margin-top:-33px;
    margin-left:30px;
    }
    Any ideas?

    I tried:

    HTML Code:
    <div class="menuleft">
    <div class="border">
    <a href="#">Link1</a>
    </div>
    </div><div class="menuleft"><div class="border">
    <a href="#">Link1</a>
    </div>
    </div>
    and

    HTML Code:
    .menuleft {
    margin-top:-32px;
    padding-left:100px;
    
    }
    
    .border {
    width:40px;
    border-right: #b2d1e1;
    border-right-width:1px;
    border-right-style:solid;
    }
    too but it won't work either
    Last edited by galaxyAbstractor; 10-25-2008 at 11:13 AM.

  2. #2
    rlodge is offline x10 Sophmore rlodge is an unknown quantity at this point
    Join Date
    Dec 2007
    Location
    Texas
    Posts
    226

    Re: [CSS]Making menu with line

    Don't you need a "display: inline;" or "display: block;" in the css to determine how it is laid out?

    Believe me, I'm no expert but that's what I've used in the menus I've done or edited.

  3. #3
    galaxyAbstractor's Avatar
    galaxyAbstractor is offline Community Advocate galaxyAbstractor is on a distinguished road
    Join Date
    Oct 2007
    Location
    Land of Null and Insanity
    Posts
    5,495

    Re: [CSS]Making menu with line

    Quote Originally Posted by rlodge View Post
    Don't you need a "display: inline;" or "display: block;" in the css to determine how it is laid out?

    Believe me, I'm no expert but that's what I've used in the menus I've done or edited.
    nope. inline just moved the links to the position where they were without margin, and block did nothing

    but guess what? display:inline-block; did it yey!

    Please see http://forums.x10hosting.com/marketp...tml#post473587 too. I give you 500 credits for a working IE solution since display isn't supported by IE (Why would it? Nothing is supported in IE...)
    Last edited by galaxyAbstractor; 10-25-2008 at 01:23 PM.

  4. #4
    rlodge is offline x10 Sophmore rlodge is an unknown quantity at this point
    Join Date
    Dec 2007
    Location
    Texas
    Posts
    226

    Re: [CSS]Making menu with line

    Well, I gave it a shot. I'm still learning CSS myself so.........

    Glad everything worked out.

Closed Thread

Similar Threads

  1. Replies: 14
    Last Post: 09-29-2008, 07:07 PM
  2. It works! ...
    By bpakidz in forum Programming Help
    Replies: 4
    Last Post: 09-07-2008, 11:12 PM
  3. New Site-Suggestions?
    By mnoutside in forum Review My Site
    Replies: 9
    Last Post: 08-27-2008, 07:01 AM
  4. GeIP Script Help
    By cybahq in forum Scripts & 3rd Party Apps
    Replies: 4
    Last Post: 07-30-2008, 06:19 AM
  5. perl script for guestbook, need help
    By shifeng in forum Scripts & 3rd Party Apps
    Replies: 14
    Last Post: 01-06-2008, 12:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers