Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Jul 2011
    Posts
    18
    Member #
    28659
    Liked
    1 times
    Hi All,

    This is my first post, I'm hoping for great results! I'm fairly new to the CSS game, and have a problem that I hope has a simple solution.

    I am creating a very simple front page which has the following information:

    NAME | item1 | item2 | item3 | item4 | item 5 |

    I made a floating list because I want them all to be centered and spaced evenly with discrete widths. I also made '|' (vertical bars) as separate <li> elements with their own widths. This has worked great, and I'm very happy with how it looks. My only issue is that when I resize my window, the list collapses. I want it to stay exactly how it is no matter the size of window.

    Comments??

    HTML:


    <span class="type1">
    <h2>
    <ul id="main_list">
    <li><span class="type2"><h1><a href="/0_home.html"> michael nally</a></h1></span></li>
    <li>|</li>
    <li class="words"><a href="/portfolio.html">PORTFOLIO</a></li>
    <li>|</li>
    <li class="words"><a href="/thesis.html">THESIS</a></li>
    <li>|</li>
    <li class="words"><a href="/resume.html">RESUME</a></li>
    <li>|</li>
    <li class="words"><a href="http://thenallyblog.tumblr.com/">BLOG</a>
    <li>|</li>
    <li class="words"><a href="/contact.html">CONTACT</a></li>
    <li>|</li>
    </ul>
    </h2>
    </span>

    CSS:

    #main_list li.words
    {
    position: relative;
    display:block;
    float:left;
    text-align:center;
    width:75px;
    list-style-type: none;
    padding:0px;
    }

    #main_list li
    {
    position: relative;
    float:left;
    width:10px;
    text-align:center;
    width: 5px;
    list-style-type: none;
    padding:0px;
    }


    Thanks!

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Upload the page somewhere and post the link. I'd have to see what you mean and I think others would as well.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Try giving the ul a set width/height. After that, what GAME said.
    TheGAME1264 likes this.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  5. #4
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    The CSS you did provide CAN be affected by other elements in the page... so providing just snippets of the code for CSS and HTML... can only give us a very small piece of a very large puzzle...

    if you can't or don't have the ability to upload the code somewhere... post the entire contents of the CSS and HTML...

  6. #5
    Junior Member
    Join Date
    Jul 2011
    Posts
    18
    Member #
    28659
    Liked
    1 times
    Wow I feel stupid. I spend so much time messing with the <li> item styling that I never bothered to set a width for the <ul>. That solved it perfectly, thanks!


    You can check out the page in question at http://www.thenally.com/index.html.

  7. #6
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Looks like you're off to a good start.
    HUMMIKE likes this.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search tags for this page

html horizontal link list

Click on a term to search for related topics.
All times are GMT -6. The time now is 05:48 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com