Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Why aren't my ID's working??

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #188117
    ClintonLee83
    Participant

    I have a simple css issue. I applied inline styles to the domain checker on this page:
    http://www.jackrabbit.host

    and the inline styles worked fine. So I took the styles and created ID’s in my style.css sheet and applied the id’s to the domain checker elements but the id’s aren’t working.

    Here is the css I put at the end of my style.css sheet for my theme:

    `
    #home_domainchecker {

    width: 648px;
    padding:5px;
    
    }
    

    #home_www {

    margin: 10px 0px 0px;
    position: absolute;
    font-size: 18px;
    }
    

    #home_domaininput {

    margin: 0px 0px 0px 52px;
    height:40px;
    font-size:18px;
    width:642px;
    }
    

    #home_selector {

    position:absolute;
    margin: -8px 0 0 222px;
    }
    

    #home_domainbutton {

    position: absolute;
    margin: -40px 0px 0px 805px;
    width: 90px !important;
    height: 40px;
    font-size: 18px;
    }
    

    `
    and here is the code I’m applying the id’s to:

    <div id="action" class="clearfix box padding-box">
    
    <form action="http://www.jackrabbit.host/high-speed-hosting/whmcsportal/domainchecker.php/?" method="post" id="home_domainchecker">
        <input type="hidden" name="direct" value="true"/>
            <div id="home_www">www.</div>
                <input type="text" name="domain" size="20" placeholder="Choose a new domain" id="home_domaininput"/>
                    <div id="home_selector">
                        <select name="ext">
                            <option>.com</option>
                            <option>.net</option>
                            <option>.org</option>
                            <option>.us</option>
                            <option>.info</option>
                            <option>.biz</option>
                            <option>.uk</option>
                            <option>.name</option>
                            <option>.ca</option>
                            <option>.co</option>
                            <option>.eu</option>
                            <option>.co.uk</option>
                        </select>
                    </div>
                <input type="submit" value="Go!" id="home_domainbutton"/>
    </form>
    
    </div>
    
    #188122
    Paulie_D
    Member

    We can’t tell much from a codedump.

    A live demo is much more use although I would say that you do seem to be overusing position:absolute.

    It’s a very inflexible layout method.

    #188123
    ClintonLee83
    Participant

    Hi Paulie, thanks for the reply :D

    The link at the top of my original post goes straight to the live problem/demo.

    I used absolute to keep the elements from interfering with each other.

    If I use the styles inline (without CSS id’s), everything looks and works perfect. If I remove the id’s and styles, the domain checker looks like it does now. When I apply the id’s with the same styles, nothing changes. It’s not reacting at all to the id’s.

    Is there something more I can put here to help?

    Thanks again Paulie!

    #188124
    Paulie_D
    Member

    Then again, it could be a caching issue.

    Do you need to clear the CSS cache to make sure that the new styles are included in the generated/linked version?

    #188125
    ClintonLee83
    Participant

    I’m consistently clearing browser, w3 and cloud flare cache and I’m using development mode to keep from caching. I can tweak other CSS and see changes immediately.

    #188308
    ClintonLee83
    Participant

    I’ve discovered the problem was a missing } . When I added my own code, I must have had it highlighted when I started typing.

    Such a small mistake causing such a big headache. It’s working great now, I appreciate your help Paulie! Thank you!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.