Selectively removing .space class div

Posted By thedrumdoctor Wed 25 May 2011
Add to Favorites1
Author Message
thedrumdoctor
 Posted Wed 25 May 2011
Supreme Being

Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)

Group: Forum Members
Last Active: Mon 21 May 2018
Posts: 94, Visits: 266
Within the Kartris layout there appear to be divs generated in certain places with the following class:

<div class="spacer">


In the CSS this class is set to clear: both;

Whilst this is fine as a default for most of the site, it ruins the display my category layout by adding a chunk of space below the H1 tag:

<h1>Classic Series</h1><div class="spacer"></div><div class="category"><div class="main"><div class="description"><ul><li>Vintage Replica Build</li><li>Mahogany/Poplar Shells</li><li>Vintage Hardware Styling</li><li>Choice of Vintage Finishes</li><li>Bloody Expensive</li><li>Nick &amp; Albie's Lad can't afford to buy them</li><li>Herman Matthews gets his for nowt<br /></li></ul></div></div>


If I could stop the spacer div appearing below the H1 tag it would be fine, but it's generated by the application rather than being hard coded in the template.

When I set the CSS for the .spacer class to display: none it fixes the category page display but breaks the front page!

Unfortunately, the spacer divs seem to have exactly the same class & ID ancestors in the overall page template so I can't seem to target the spacer divs individually to display or hide them when they appear in an unwanted area of my layout.

Can anyone think of a way around how to stop the spacer divs appearing in certain places?
Wed 25 May 2011 by Paul
Paul
 Posted Wed 25 May 2011
große Käse

große Käse - (449,860 reputation)große Käse - (449,860 reputation)große Käse - (449,860 reputation)große Käse - (449,860 reputation)große Käse - (449,860 reputation)große Käse - (449,860 reputation)große Käse - (449,860 reputation)große Käse - (449,860 reputation)große Käse - (449,860 reputation)

Group: Administrators
Last Active: Fri 15 Sep 2023
Posts: 806, Visits: 2,737
Actually I think this is part of the aspx pages themselves, not the template. So potentially it could be removed from there.

However, an alternative is to hide it with css. Just set the 'spacer' class with

display: none;


--
If my post solves your issue, can you 'Mark as Answer' so it's easier for other users to find in future.

If you would like to be informed of new features, new releases, developments and occasional special bonuses, please sign up to our mailing list: http://bit.ly/19sKMZb
css
thedrumdoctor
 Posted Fri 27 May 2011
Supreme Being

Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)

Group: Forum Members
Last Active: Mon 21 May 2018
Posts: 94, Visits: 266
I did try display: none; originally, but it hit every spacer div which wasn't what I wanted to do as that breaks the layout.

I'm unable to target the specific spacer divs as they all seem to inherit the same ancestors, so I guess I'll try and do it from within the relevant aspx page (gulp...Crying)
thedrumdoctor
 Posted Tue 31 May 2011
Supreme Being

Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)Supreme Being - (61,171 reputation)

Group: Forum Members
Last Active: Mon 21 May 2018
Posts: 94, Visits: 266
Figured how to do this:

The spacer div in question is found in Templates\CategoryTemplate.ascx so I simply added style="display: none;" to the div.

Now the 'clear' attribute is no longer there and the category page renders nicely.

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top