Jump to content

Background


unidox

Recommended Posts

I have this:

 

div.admin_side_txt {
    width: 193px;
    height: 29px;
    color: #FFFFFF;
    font-size: 10px;
    background-image: url(../images/admin_side_bg2.gif);
}

 

and here is the html:

 

<div class="admin_side_txt">Hi1</div>
            <div class="admin_side_txt">Hi2</div>
            <div class="admin_side_txt">Hi3</div>

 

Now what I am trying to do is leave the background in the same place it is now, but have the text move over 15 px to the right and 15 px from the top. How do I do that.

Link to comment
https://forums.phpfreaks.com/topic/97696-background/
Share on other sites

I got this so far:

 

div.admin_side_bg2 {
    width: 193px;
    margin-top: 0px;
    margin-left: 0px;
    background-image: url(../images/admin_side_bg2.gif);
}
div.admin_side_txt {
    color: #FFFFFF;
    font-size: 10px;
    text-align: left;
    margin-left: 15px;
    height: 29px;
    width: 193px;
}

 

<div class="admin_side_bg2">
                <div class="admin_side_txt">Hi 1</div>
                <div class="admin_side_txt">Hi 2</div>
                <div class="admin_side_txt">Hi 3</div>
            </div>

 

Just the text isint going down 15 px. Now what

Link to comment
https://forums.phpfreaks.com/topic/97696-background/#findComment-499917
Share on other sites

.admin_side_bg2 {

width: 193px;

margin: 0;

padding: 15px 0 0 15px

background: url(../images/admin_side_bg2.gif);

}

.admin_side_bg2 p {

    color: #fff;

    font-size: 10px;

    line-height: 29px;

}

 

<div class="admin_side_bg2">

<p>Hi 1</p>

<p>Hi 2</p>

<p>Hi 3</p>

</div>

Link to comment
https://forums.phpfreaks.com/topic/97696-background/#findComment-500000
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.