Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Aiheen aloitti: archvillainxx - kesäkuu 20, 2011, 05:46:10 AP

Otsikko: How do I add a div and remove main_block.png with css?
Kirjoitti: archvillainxx - kesäkuu 20, 2011, 05:46:10 AP
I know it's a stupid question... I'm still new at this. The site keeps going into an error page. Here's the area I want to add the div in, where it says "NEW DIV HERE".


<body>';

   echo '
<div class="content_wrap" id="mainframe">

   <div id="toolbar">
   ',template_menu(),'
   </div>';

  NEW DIV HERE

   // The main content should go here.
   echo '
   <div id="bodyarea" class="content">';
}


So far I tried the following:


<div id="space">
</div>';


and


echo '
<div id='space'>
</div>";
Otsikko: Re: How do I add a div?
Kirjoitti: Joker™ - kesäkuu 20, 2011, 05:59:15 AP
echo '
<div class="space">
</div>';


Try this ;). Also don't forget to mention this div in your css.
Otsikko: Re: How do I add a div?
Kirjoitti: archvillainxx - kesäkuu 20, 2011, 04:34:23 IP
It isn't working. I gave up on my previous theme and figured it might be better with the latest SMF version, but still giving me the same error.

I want to add 2 divs inside my header, the IDs being "navigation" and "intro". I added the following  css in my css file but...


#navigation
{
}

#intro
{
}


Here is the site
http://pvpaura.com/legionary/index.php
(http://pvpaura.com/legionary/index.php)

Also, can someone tell me how I can get rid of the "main_block.png" image on the left of my catbg? I can't find it in my css.  :'(
Otsikko: Re: How do I add a div and remove main_block.png with css?
Kirjoitti: mashby - kesäkuu 20, 2011, 05:32:31 IP
LainaaAlso, can someone tell me how I can get rid of the "main_block.png" image on the left of my catbg? I can't find it in my css.  :'(
Grab a copy of the portal.css file from the default theme's CSS folder and place it in the css folder of the theme you are working on. And what happened to the main menu on your site? Is that intentional? :)
Otsikko: Re: How do I add a div and remove main_block.png with css?
Kirjoitti: archvillainxx - kesäkuu 21, 2011, 05:50:52 AP
Lainaus käyttäjältä: mashby - kesäkuu 20, 2011, 05:32:31 IP
LainaaAlso, can someone tell me how I can get rid of the "main_block.png" image on the left of my catbg? I can't find it in my css.  :'(
Grab a copy of the portal.css file from the default theme's CSS folder and place it in the css folder of the theme you are working on. And what happened to the main menu on your site? Is that intentional? :)

Hey, so I found the following in my portal.css, and added it to my theme's css with the edits but it didn't get rid of the main_block image on the left of my catbg bar. Any suggestions?

h4.catbg span.left, h4.catbg2 span.left, h3.catbg span.left, h3.catbg2 span.left, .table_list tbody.header td span.left
{
float: left;
display: block;
width: 9px;
height: 31px;
background: url(../images/theme/main_block.png) no-repeat 0 -160px;
}

h4.titlebg span.left, h3.titlebg span.left
{
float: left;
display: block;
width: 9px;
height: 31px;
background: url(../images/theme/main_block.png) no-repeat 0 -200px;
}


Btw I managed to add the divs! And the missing main menu was intentional, I wanted to add my own menu there.
Otsikko: Re: How do I add a div and remove main_block.png with css?
Kirjoitti: archvillainxx - kesäkuu 23, 2011, 05:59:28 AP
Nevermind, I realized what I did wrong. I thought I was suppose to copy paste any reference to the main_block to my index.css, just tried taking the entire portal.css to my css folder and like magic... Dont really understand what happened but ok. Thank for your help.