Community Forums › Forums › Archived Forums › Design Tips and Tricks › css behaving differently on static home page than on posts
Tagged: css, Enterprise Pro, padding
- This topic has 5 replies, 2 voices, and was last updated 10 years ago by Lauren @ OnceCoupled.
-
AuthorPosts
-
April 16, 2014 at 5:14 am #100652jhguynnMember
I'm using Enterprise Pro theme, and I use css to bring the right sidebar closer (vertically) to the main content after responsively moving underneath on smaller screen sizes:
.entry {padding: 5px 0px 0px 0px; padding: .5rem 0rem 0rem 0rem; margin-bottom: -80px; margin-bottom: -8rem; line-height:1.1; font-size:90%;}
Without this css adjustment, the padding is just too much. This works well for both pages and posts, but the adjustment is less on the static home page than it is on posts Compare the following
Static home page
Sample post for same siteReduce browser size when viewing to allow the right sidebar to relocate beneath the main content, and observe the distance between the bottom of the testimonial slider and the "Quick Start Form" graphic.
Why do these behave differently?
http://www.lifepolicydetective.co.uk/April 16, 2014 at 7:43 am #100673Lauren @ OnceCoupledMemberYour home page has extra line breaks in your code:
<div class="spacer-30">...</div> <br> <br>
We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com
April 16, 2014 at 12:19 pm #100727jhguynnMemberLauren:
Thanks fro the feedback. I see that now when I use Firebug. For the life of me I cannot determine what the source of those 2X line breaks is. Below is the code. Can you pinpoint anything amiss here? FYI: I tried deleting the code, saving, and recopying the code from notepad and resaving. No change (and I flushed my cache).
<h1>Personalized Life Insurance Quotes</h1> <p>We'll investigate over <strong class="text-red">150 Life insurance providers</strong> to develop a personalized Life insurance quote just for you. It's <strong class="text-blue"><em>free</em></strong> and it's <strong class="text-blue"><em>easy</em></strong>! Take a look:</p> <div>[svpVideo v=1]</div> <div class="spacer-30"> <h2 class="text-blue">Testimonials</h2> Look what some of our happy clients are saying about <strong class="text-red">Life Policy Detective</strong>: <div class="testimonial-slider"> [su_content_slider effect="fadeUp" autoplay="5" style="light" pages = "yes"] [su_content_slide]<a href="http://www.lifepolicydetective.co.uk/case-studies#Gregson"><img alt="" src="http://www.lifepolicydetective.co.uk/wp-content/uploads/2014/02/testimonial-gregson.png" /></a>[/su_content_slide] [su_content_slide]<a href="http://www.lifepolicydetective.co.uk/case-studies#Smythe"><img alt="" src="http://www.lifepolicydetective.co.uk/wp-content/uploads/2014/02/testimonial-smythe.png" /></a>[/su_content_slide] [su_content_slide]<a href="http://www.lifepolicydetective.co.uk/case-studies#Gilcrest"><img alt="" src="http://www.lifepolicydetective.co.uk/wp-content/uploads/2014/02/testimonial-gilcrest.png" /></a>[/su_content_slide] [su_content_slide]<a href="http://www.lifepolicydetective.co.uk/case-studies#Jameson"><img alt="" src="http://www.lifepolicydetective.co.uk/wp-content/uploads/2014/02/testimonial-jameson.png" /></a>[/su_content_slide] [/su_content_slider] </div> </div>
April 16, 2014 at 1:00 pm #100732Lauren @ OnceCoupledMemberWhere are you using this text? Inside the WordPress editor? Sometimes it is a little wonky for me, too. Try deleting the line breaks at the end, ie:
... [/su_content_slider]</div></div>
We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com
April 16, 2014 at 1:41 pm #100742jhguynnMemberI have the visual editor disabled. No line breaks to delete here.
April 16, 2014 at 4:34 pm #100840Lauren @ OnceCoupledMemberYes, but you are still using the WordPress text editor, while not the visual one, correct? I may be misunderstanding, and there's no guarantee this is the answer, but WordPress will sometimes add line breaks when my code in the text editor is on a new line. Otherwise, I can't think of why those would be inserted!
Best,
Lauren
We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.