Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

Overriding CSS hard-coded by my shopping cart template

overidding had coded css



10:40 pm on Jul 15, 2009 (gmt 0)

5+ Year Member

I'm using a custom template from volusion which is hard coded to throw in extra <br>'s with any <div> so it creates spaces where I don't want them. You can see what I'm talking about using firebug to view the center bottom of our page (<snip>) right below the "mma expo" banner.

Now I'm not great at css, but I've managed to customize almost all of that template...

so is there a way I can code this to remove those annoying <br>'s added by volusion's hardcoding?

I really appreciate any help guys...

[edited by: swa66 at 10:54 pm (utc) on July 15, 2009]
[edit reason] No URLs, please see ToS and forum charter [/edit]


5:19 am on Jul 16, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

If the <br> elements are within a container you could do the following.

for example, if the shopping cart looks like this:

<div id="cart">
Item 1 <br /><br />
Item 2 <br /><br />
Total: $9.99<br /><br />

You could add the following to your CSS:

#cart br {height: 2px}

to make all of the <br /> elements within the cart 2 pixels high.


10:18 am on Jul 16, 2009 (gmt 0)

5+ Year Member

that's great, thank you! I'll try it and let you know the results...


10:45 am on Jul 16, 2009 (gmt 0)

5+ Year Member

No luck... your idea made perfect sense too... any other ideas?


11:17 am on Jul 16, 2009 (gmt 0)

10+ Year Member

I'm guessing what you want to do is "hide" the BR's?

If all the BR's are in one div and you don't want ANY of the BR's to show then do something like:
#yourid br {display:none;}

You need to be very cautious with this and do lots of testing but it is a simple fix if the BR's are all located inside divs where you don't need any showing.


11:21 am on Jul 16, 2009 (gmt 0)

5+ Year Member

got it... it was

#cart br{display: none}


12:46 pm on Jul 16, 2009 (gmt 0)

10+ Year Member

Just please test very careful as that is a very broad and sweeping change to make in one go :-)


12:48 pm on Jul 16, 2009 (gmt 0)

5+ Year Member

so i'm using disply:block and it works perfectly in Firefox after all testing, but viewing with IE (i'm using version 8) doesn't do the same. I tried adding a line-height too, but changed nothing in IE...

what could I do that would have same effect on both sites?


Featured Threads

Hot Threads This Week

Hot Threads This Month