Results 1 to 3 of 3

Thread: Help for a Newbe

  1. #1
    Join Date
    Jan 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help for a Newbe

    Hi,

    I am just learning CSS and working on my first page. I thought I understood the concept of block and linline but apparently not.

    I am simply trying to have text (one word) show up three times spaced equal across a single line

    eg. Text__________Text___________Text

    I used the following code and planed to add a margin or padding style but I can not even get the items to line up. Ugh! what am i missing?

    <ul style="font:'Myriad Pro';color:red;display:inline;list-style-type:none;">
    <li>before</li>
    <li>before</li>
    <li>before</li></ul>

  2. #2
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Fizzy
    I am simply trying to have text (one word) show up three times spaced equal across a single line
    Why? The best answer can depend such details. I can think of five possible solutions.

    I used the following code and planed to add a margin or padding style but I can not even get the items to line up. Ugh! what am i missing?

    <ul style="font:'Myriad Pro';color:red;display:inline;list-style-type:none;">
    <li>before</li>
    <li>before</li>
    <li>before</li></ul>
    You've styled the list (ul) element to be in-line, but the list items still have a list-item display property value (block-level with list item semantics).

    • It's better to use a style sheet than in-line style attributes.
    • A generic font family should always accompany specific choices.
    • A background colour (even just transparent) should always be paired with a foreground colour, and visa versa. The only exception is where a declaration will be applied from another rule.
    Mike

  3. #3
    Join Date
    Jan 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the help.

    It looks like I found a solution (by accident I am afraid) that seems to work.

    I used the following

    <div id="list">
    <p>test</p>
    <p>test</p>
    <p>test</p>

    </div>

    and in the Header...though I plan to create a style sheet as you suggested...I placed

    div#list p{font:'Myriad Pro','Times New Roman';color:blue;display:inline;list-style-type:none;padding:150px;}

    This is probably an odd way to get what I wanted but since my total expierence with CSS is reading a quick start guide, I'll take what I can get!

Bookmarks

Posting Permissions

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