Jump to content

Help center div


UnknownPlayer

Recommended Posts

Can someone help me with this div:

.fb {
color: #333;
width: 600px;
padding: 5px;
background-color: #f7f7f7;
border: 1px solid #b7b7b7;
}

 

That div is main div, but it is not centered, can someone tell me what should i add to make it on center?

btw in attachment is compressed template..

Thanks.

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/228436-help-center-div/
Share on other sites

I would use an ID for that div really instead of a class. anyways this is what you can do

 

div#my-centered-div{
     margin:0 auto;
     width:960px; /*just some width */
}

 

for IE6 and lower use

div#my-centered-div{
     text-align:center;
}

 

Hope this helps

Link to comment
https://forums.phpfreaks.com/topic/228436-help-center-div/#findComment-1177910
Share on other sites

And before <div id="fb"> to put <div id="my-centered-div"> ?

no read that last sentence, i have a lot of difficulty deciphering that.

 

Anyways, since i have no clue what your last question is.

Most websites have a markup like this and what they do is center the wrapper div.

So in other words They wrap up all they want in 1 div (in this case named wrapper) and apply the margin:0 auto; to it.

 

<body>
     <div id=wrapper>
            <div id=header></div>
            <div id=left></div>
            <div id=mid></div>
            <div id=right></div>
            <div id=footer></div>
      </div>
</body>

 

if you have questions let me know

Link to comment
https://forums.phpfreaks.com/topic/228436-help-center-div/#findComment-1177993
Share on other sites

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.