News:

Keeping Crip's dream alive is our mission! :)

 

Recent Topics

Members
Stats
  • Total Posts: 10,779
  • Total Topics: 1,379
  • Online today: 149
  • Online ever: 879
  • (Jan 21, 20, 05:49:15 PM)
Users Online
Users: 0
Guests: 86
Total: 86

Help need in black rain V3

Started by lgrapid, Feb 03, 11, 12:49:34 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lgrapid

im trying to center the banner but i need a special code to do it or i get an error my site is http://www.thelgclan.tk

willemjan

Hi, and welcome!

centering an header is a lot of trial and error. Look at this topic for examples: jpr62.com/theme/index.php?topic=382.70

We could do it for you if you like.

Crip

hi,
css/index.css
change this:

h1#forum_name {
    color: #FFFFFF;
    font-family: Verdana,helvetica,sans-serif;
    font-size: 135%;
    margin: 0;
    padding: 0.6em 0;
}


make like:

h1#forum_name {
    color: #FFFFFF;
    font-family: Verdana,helvetica,sans-serif;
    font-size: 135%;
    margin-left: 30%;  <===see change===>
    padding: 0.6em 0;
}
I have become comfortably numb!


No PM's for Support unless invited! 

I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -
TOTM Winner.

lgrapid

Thanks crip its now in the center!

Crip

I have become comfortably numb!


No PM's for Support unless invited! 

I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -
TOTM Winner.

willemjan

#5
I'm sorry to break the happyness, but its not centered (see http://img573.imageshack.us/i/prtscrn1.png/ and http://img96.imageshack.us/i/prtscrn2.png/). We discussed this before, but that code doesn't center an image...

Quote from: willemjan on Jan 11, 11, 11:36:51 AM
Oh and btw your solution won't work. Example:

The total width is 1000px and the logo is 400px, then 30% would be correct:

|30%(=300px)|400px(=logo img)|rest(=300px)|

But if the browserwindow is larger, say 1200px:

|30%(=360px)|400px(=logo img)|rest(=440px)|

You see that it isnt centered any more ;)

You need to set the margin left and right to auto. But because that is different code then before, it will break the header. That's why you need some trial and error to get it working... I'll get you the code 2day, ok?

willemjan

#6
I tried quite a lot on firebug to get the margin left and right to auto, but couldn't get it to work. Then I have looked at index.template.php, and saw that the logo was actually an <hr /> element in an div. This means you only need to center the text in the div. So instead of this:


h1#forum_name {
    color: #FFFFFF;
    font-family: Verdana,helvetica,sans-serif;
    font-size: 135%;
    margin-left: 30%;  <===see change===>
    padding: 0.6em 0;
}


Do this:

h1#forum_name {
    color: #FFFFFF;
    font-family: Verdana,helvetica,sans-serif;
    font-size: 135%;
    padding: 0.6em 0;
    margin: 0;                  /*see change*/
    text-align: center ;        /*see change*/
}