Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Apr 2007
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How would I style this

    I am trying to style some text and I can't figure it out.
    Here is what I am trying to do.

    Product Photos(Click to View)

    I want this on the same line. But if I style them seperately then it puts them one under the other. I can do it by formating the text directly but then that defeats the purpose of the style sheet.
    Thanks

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,695
    Thanks
    6
    Thanked 1,011 Times in 984 Posts
    And how does the HTML look like? The code for the text and the surrounding HTML are important.
    If you have something like:
    Code:
    <p>Product Photos (Click to View)</p>
    You could wrap one part in a span and style both, the p and the span differently (the span style would overwrite the p style)

  • #3
    New Coder
    Join Date
    Apr 2007
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks a lot! I saw "span" before, but I had never know how it worked.

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,695
    Thanks
    6
    Thanked 1,011 Times in 984 Posts
    Span is a semantically neutral element that has no meaning by itself. Just like div doesn’t do anything by itself. Span is the inline equivalent for the block-level div, so to speak, and it becomes useful if you need to apply a style to inline content like text etc. when elements like <strong> or <em> wouldn’t be the right choice.


  •  

    Posting Permissions

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