• Resolved veliapola

    (@veliapola)


    I have created an intro that appears once only on the home page with a div class and have this on page template:

    <div class="intro">

    <?php include_once(TEMPLATEPATH.'/intro.php');?></div>

    I would like to set different margins or padding for the intro than the balance of the body of text. When I add either (or even a border) it affects the entire page instead of just the intro.

    website: https://www.golfforthegood.net/test/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Looking at the source of your page:

    <div class="intro">
    
    <div id="introid">
    
    	<div class="intro"><h1>Welcome</h1>
    		<br></br>

    Two intro divs. I didn’t look over the entire source, but I imagine the first one is affecting the entire doc, or a large portion of it.

    Thread Starter veliapola

    (@veliapola)

    Thanks, I had removed the second one from the css but had left it in the php file. It’s closer now but I’m still getting a double border and padding isn’t working properly… but without the border I can live with it! Many thanks

    you had two intro id’s in your css? That’s completely unneccessary.

    browsers will only use one of them in your style sheet.

    Make it so you only have one div with the intro call as it’s applying the css to both dividers.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding div class to front page’ is closed to new replies.