- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I’m quite young, and in the process of developing my first website for a clothing brand.
I’m trying to produce a button-like cart to feature in the navigation, using Simplecart JS as the base for the cart works perfectly, but the problem is with how the elements of the cart are displaying as a group (button). They won’t display inline until they’re been interacted with (eg. using add to cart on a product), any one have an idea how to display them correctly? I’m quite confused.
#cart {
float:right;
display: block;
margin-left: 20px;
width:120px;
text-align:center;
}
I tried something like that originally! Although I wanted to keep it adaptive to the sizes of the input numbers, but i guess i’ll have to comprise to the fact it works.
Something is the JS is causing it not to display properly. If you strip out the js and add a quantity and price manually to the html it looks how you want: http://codepen.io/waylaid/pen/lHLBf
That JS is too dense for me to go through though…
Appreciate the input! I pretty sure I have it sorted, but it’s nice to know where the problem lies.