Jump to content

Recommended Posts

MY question is quite dumb, but I am stuck in my css and I don't know what to do. Anyways, I have three items in my header, title, links, and login. However, by default html stacks everything, instead of inline where </br> would create a new line. I researched something about display: inline-block, however I've tried it multiple times at many places and it still won't work. Here's my code.

 

body {
    background:url('/images/background.jpg');
    background-repeat: repeat-y repeat-x;
    font-family:‘Gill Sans’, ‘Lucida Grande’, ‘Lucida Sans Unicode’, Verdana, Helvetica, Arial, sans-serif;
    font-size:14px;
    color:#1d1d1d;
    width: 100%;
    display: inline-block;
}

a {
    text-decoration:none;
    color: red;
}


#headertop {
    background-color:#1d1d1d;
    color:#d4d4d4;
    padding-bottom: 15px;
    position:relative;
    width: 100%;
    display: inline-block;
    
}

#headertop table{
    color:#d4d4d4;
    ;
}

#headertop ul{
    text-decoration: none;
    display: inline-block;
}

#seconddrop{
  
}

#headerpages {
    display:inline-block;
    list-style-type: none;
}

#login{
    float; right;
}

.error {
    color:#1d1d1d; 
}

.main {
    position: relative;
    width: 1000px;
    margin-left: auto;
    margin-right: auto;
    
}

#footer  {
   position: relative;
   padding-bottom: 5px;
   width: 100%;
   background-color:#1d1d1d;
   color:#d4d4d4;
   display: inline-block;
    
}

#footer  li {

}

#footerdrop {
    float:right;
}

#copyright {
    float:right;
}

any suggestions? thanks!

Link to comment
https://forums.phpfreaks.com/topic/245794-noob-question-stacking/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.