I’m very new to using CSS and have only rudimentury level HTML and PHP skills but I’m very used to C++/C# so I’m quite technical.
My problem is that I’ve made a website based on the tutorial from this site and I’m dynamically linking to my wordpress blog using the following code;
by: < ?php the_author(); ?> on < ?php the_date(); ?>
< ?php the_content(); ?>
< ?php endforeach; ?>
This successfully displays the latest 3 blog entries no problem, my problem is when I attempt to display them with their own individual backgrounds based on the div id "blog-padding".
What I want to happen is this;
However when I add even 1 pixel of padding… this happens:
Just in-case its relevent… here is the div code;
At first glance, it’s not padding you need, it’s margin (margin-top, in this case). Padding is an internal (i.e. inside the div) measurement, while margin is an external ‘push away from X’ value. Try
To get the text away from the edges as well you could change it to
Note how ‘padding: 10px’ adds 10px of internal space to the div to all four sides: top, right, bottom and left. Therefore, to keep the width static, I’ve reduced it to 780px to allow for 10px padding on the left and another 10px on the right…
Hope this helps.
You must be logged in to reply to this topic.