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 6 of 6
  1. #1
    New Coder
    Join Date
    Dec 2013
    Posts
    22
    Thanks
    22
    Thanked 0 Times in 0 Posts

    Button problem :D Help needed

    hello.I want to create a styled button,I used this as css:
    <style type="text/css">
    .loadmore
    {
    background-color:white;
    border:1px solid #13ACD9;
    display:inline-block;
    color:#13ACD9;
    font-family:"Raleway",sans-serif;
    font-size:15px;
    height:50px;
    line-height:50px;
    width:200px;
    text-decoration:none;
    text-align:center;
    position:absolute;
    top:1631 px;
    left:573 px;
    }
    </style>
    And this as Html:
    <button class="loadmore">Load More</button>

    And the button dosent appear anywhere,I dont want to give it a function yet,I just want to make it appear,at the specified position with the specified style.
    Thanks in advance

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,486
    Thanks
    6
    Thanked 981 Times in 954 Posts
    Even though people tend to disagree with me on this subject: Think about how this should work without JS before you think about using it. A push button does nothing by itself so if you are using JS then create and append it with JS in the first place. Nothing is more useless than a useless element in the HTML.

    Now, look closer at your CSS again: Units must not have a whitespace before the value.

  • Users who have thanked VIPStephan for this post:

    Bitzu (01-01-2014)

  • #3
    New Coder
    Join Date
    Dec 2013
    Posts
    22
    Thanks
    22
    Thanked 0 Times in 0 Posts
    Now I feel retarded,thanks very much for guiding me to normality

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,486
    Thanks
    6
    Thanked 981 Times in 954 Posts
    We all get retarded if we stare at code for too long.

  • Users who have thanked VIPStephan for this post:

    Bitzu (01-01-2014)

  • #5
    New to the CF scene
    Join Date
    Dec 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I still don't understand the underlying issue with this piece of code. I am a newbie to web programming, and any type of help I can get would be very much appreciated. How does CSS intermingle with Html in a text editor such as Notepad ++?

  • #6
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    3,772
    Thanks
    23
    Thanked 550 Times in 549 Posts
    @develop,
    How does CSS intermingle with Html in a text editor such as Notepad ++?
    It doesn't. It works in a browser. or do you mean something like this:
    Code:
    <!DOCTYPE html>
    <html>
    <head>
    <title></title>
    <style type="text/css">
    /*   your style code goes here   */
    </style>
    
    <!--   or a link to an external stylesheet   -->
    <link rel="stylesheet" href="main.css" type="text/css" />
    </head>
    
    <body>
    <!--	HTML code here   -->
    </body>
    </html>
    Evolution - The non-random survival of random variants.

  • Users who have thanked sunfighter for this post:

    Bitzu (01-03-2014)


  •  

    Tags for this Thread

    Posting Permissions

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