Jump to content
TNG Community
Moonerd

Adding a container div

Recommended Posts

Moonerd

Hello,

I am not PHP savvy “yet” and I am not sure how to implement that this with TNG.

On my website, I am looking to add a new container div to the div with the id “inner-wrap”. So, the div with the id “inner-wrap” will be the child of the new container div.

 

Example:

<div class=”new-container”>

<div id=”inner-wrap” class=”wrap hfeed kt-clear>

</div>

</div>

 

Another example is the Kloosterman’s website his container div id is called “titlebox”.

 

My sight: OurSentimentalJourney.net

I am using the Kloosterman method – WordPress/TNG

TNG: v.13.1.2

 

My goal is to put a max-width on the new-container div. which will be easy once I have the div. 😃

Share this post


Link to post
Share on other sites
klooster

My div Titlebox is just a class that puts a thin line around the main content, to outline the content a bit more.

Because the div has to start before the main content loads. I did put in in my WPTNGtopmenu.php, like this:

----------------------------------

<?php
/** Loads the WordPress Environment and Template */
require ('../wp-blog-header.php' );\
get_header ();
?>

<div class="titlebox">

----------------------------------

Because this starts the div, there has to be an end div in the WPTNGfooter.php  to close the div call, like this:

----------------------------------

</div>
<?php
get_footer('tng'); 
?>

----------------------------------

The Titlebox css class looks like this:

----------------------------------

/* START TNG LINE  AROUND MAIN CONTENT */

.titlebox {
border: 1px solid silver;
background-color: #f9f9f9;
padding: 10px;
margin: 1px;
}

/* END TNG LINE  AROUND MAIN CONTENT */

----------------------------------

Share this post


Link to post
Share on other sites
Moonerd

Thank you, Cees,

Hopefully, I can mess with this soon.

Justin

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×