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.
Page 1 of 2 12 LastLast
Results 1 to 15 of 17

Thread: who can help me

  1. #1
    New Coder
    Join Date
    Jul 2011
    Posts
    13
    Thanks
    2
    Thanked 0 Times in 0 Posts

    who can help me

    Code:
    <div id="first_title">
    						<img id="action_logo" src="images/action_logo.jpg" alt="" />
    						<span>视频</span>
    						<span>世界地球日(World Earth Day)</span>
    						<!--first_title_end-->
    					</div>
    why does not the div keep on a line? thank you very much
    Last edited by dxcqcv; 11-09-2011 at 03:04 AM.

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,640
    Thanks
    0
    Thanked 649 Times in 639 Posts
    What CSS is being applied to it?
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    New Coder
    Join Date
    Jul 2011
    Posts
    13
    Thanks
    2
    Thanked 0 Times in 0 Posts
    I have no idea where is problem, just like pic
    Attached Thumbnails Attached Thumbnails who can help me-keepline.jpg  

  • #4
    New Coder
    Join Date
    Jul 2011
    Posts
    13
    Thanks
    2
    Thanked 0 Times in 0 Posts
    and my code is here,it's too big so I deleted some pictures
    Attached Files Attached Files

  • #5
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    That image is so small noone can see your issue.

    Cant you post a link to your site? I for one will not download someone's files.
    Teed

  • #6
    New Coder
    Join Date
    Jul 2011
    Posts
    13
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by teedoff View Post
    That image is so small noone can see your issue.

    Cant you post a link to your site? I for one will not download someone's files.
    OK, here

    http://dxcqcv.info/problem/SIGEE_subject/index.html

  • #7
    Registered User
    Join Date
    Jun 2011
    Posts
    1,063
    Thanks
    12
    Thanked 241 Times in 240 Posts
    try adding

    Code:
    vertical-align: middle;
    to the <img>

    to vertically center everything:

    Code:
    #first_title * {
        vertical-align: middle;
    }
    Last edited by Sammy12; 11-09-2011 at 05:06 AM.

  • Users who have thanked Sammy12 for this post:

    dxcqcv (11-09-2011)

  • #8
    New Coder
    Join Date
    Jul 2011
    Posts
    13
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Sammy12 View Post
    try adding

    Code:
    vertical-align: middle;
    to the <img>

    to vertically center everything:

    Code:
    #first_title * {
        vertical-align: middle;
    }
    thanks,but why is the words on the top?

  • #9
    Registered User
    Join Date
    Jun 2011
    Posts
    1,063
    Thanks
    12
    Thanked 241 Times in 240 Posts
    Quote Originally Posted by Sammy12 View Post
    to vertically center everything:

    Code:
    #first_title * {
        vertical-align: middle;
    }
    ^ That will align all of them in the middle

    the height of the <div> is dependent on the tallest child element. using vertical-align: middle; will make all the text vertically align in the middle

  • #10
    New Coder
    Join Date
    Jul 2011
    Posts
    13
    Thanks
    2
    Thanked 0 Times in 0 Posts
    and most time I write div>img+span is no problem, just this cannot keep a line, so unusual

  • #11
    New Coder
    Join Date
    Jul 2011
    Posts
    13
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Sammy12 View Post
    ^ That will align all of them in the middle

    the height of the <div> is dependent on the tallest child element. using vertical-align: middle; will make all the text vertically align in the middle
    yes, I know, but words should be on bottom, should not it?

  • #12
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,302
    Thanks
    28
    Thanked 276 Times in 270 Posts
    Quote Originally Posted by dxcqcv View Post
    yes, I know, but words should be on bottom, should not it?
    I'm guessing that you want #third_title * { vertical-align: text-bottom; }.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #13
    Registered User
    Join Date
    Jun 2011
    Posts
    1,063
    Thanks
    12
    Thanked 241 Times in 240 Posts
    http://meyerweb.com/eric/tools/css/reset/

    a lot of people set it in the beginning
    Code:
    vertical-align: baseline;
    but since I always use floats, I don't ever have to use vertical-align.
    If your planning on using a lot of inline elements w/out floating, its best you set a vertical alignment to all inline elements so you have some consistency

  • #14
    New Coder
    Join Date
    Jul 2011
    Posts
    13
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Arbitrator View Post
    I'm guessing that you want #third_title * { vertical-align: text-bottom; }.
    sure,but I think that is auto like before, why will this times be set it

  • #15
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,302
    Thanks
    28
    Thanked 276 Times in 270 Posts
    Quote Originally Posted by Sammy12 View Post
    a lot of people set it in the beginning
    Code:
    vertical-align: baseline;
    but since I always use floats, I don't ever have to use vertical-align.
    If your planning on using a lot of inline elements w/out floating, its best you set a vertical alignment to all inline elements so you have some consistency
    Isn't that redundant? vertical-align: baseline is the default. As far as I'm aware, no browser default styles contradict this either.
    For every complex problem, there is an answer that is clear, simple, and wrong.


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

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