Support » Themes and Templates » Setting a css class ?

  • Hi, i got this class ( is that what is called ?) in my CSS file :

    .homebox {
    width : 460px;
    background-color : #adadad;
    display : block;
    float : left;
    margin-bottom : 20px;
    }

    So i want to have 2 types of text size inside them. one for the title and another one for the text.

    I also want to have a 2pixel border around the text “boxes” one pixel one color the other pixel another color, just like in this web

    I have tried it myself but my layout gets all fucked up, i beleive is because my width is set to 460px in my homebox right ?

    Could anyone help me ?

    this is my web
    thanx !

Viewing 1 replies (of 1 total)
  • in style.css add styles for font of text, and add new styles for font of title h2:

    .homebox {
    width : 460px;
    background-color : #adadad;
    display : block;
    float : left;
    margin-bottom : 20px;
    font-family: georgia, serif; /* enter whatever font-family you want */
    font-size: 12px; /* these are only examples */
    }
    
    .homebox h2 {
    font-family: arial, sans-serif; /* enter whatever font-family you want */
    font-size: 16px;
    }

    before you attempt the next step – make a backup copy of your theme files, and keep track of the changes you make, so you can reverse it if something goes wrong.

    to get an inner white border, you need to make another span with a class of .homebox-inner:
    edit the php file that creates your front page (most likely index.php) and find the lines that make the .homebox;
    something beginning with <span class="homebox">
    directly after <span class="homebox"> add <span class="homebox-inner">;
    then find the first </span> that follows, and add another </span> behind it.
    then adapt the style for .homebox and add another style for .homebox-inner:

    .homebox {
    background-color : #eeeeee;
    display : block;
    float : left;
    margin-bottom : 20px;
    padding : 0px; /* padding and width is changed here */
    width : 458px;
    border : 1px solid #bbbbbb;
    font-family: georgia, serif;
    font-size: 12px;
    }
    
    .homebox-inner {
    border: 1px solid white;
    float: left;
    padding: 10px;
    }

    good luck 😉

Viewing 1 replies (of 1 total)
  • The topic ‘Setting a css class ?’ is closed to new replies.