- This topic is empty.
-
AuthorPosts
-
June 24, 2014 at 10:58 am #173578
shaneisme
ParticipantFirst, here’s a demo: http://codepen.io/drainpip/pen/EGeyg
The problem I’m having is the
font-size: 150%
on the::after
element. Some fonts and resolutions, things just start breaking up. I’m trying to think of how else to more simply organize the CSS, or change my markup, but I seem to be stuck…Does anyone have ideas on how to keep the right arrow and its border box paired perfectly with its parent?
P.S. – for full disclosure, this will be used on a corporate website so let me know if using your code for that purpose is OK should it be a better solution!
June 24, 2014 at 1:06 pm #173590Paulie_D
MemberDoes anyone have ideas on how to keep the right arrow and its border box paired perfectly with its parent?
I’m inclined use a div to define the outlines etc and then let the anchor and pseudo-element be inside it.
If I’m right that should fix the border problem…but I’d have to have a play first.
June 24, 2014 at 1:10 pm #173591Paulie_D
Membercould you do away with the vertical border?
That works.
One thing (in all the pens) the class should be specified as affecting anchor
a.button-arrow
otherwise (at present) it’s not taking on the right font-color.June 24, 2014 at 1:42 pm #173596shaneisme
ParticipantThanks for the idea @wolfcry911 – I think with a little tuning I could still get the
left-border
back.I’m going to mess with yours and see what I can do.
@Paulie_D – in the actual environment the color is going through properly due to other declarations, so I’m not too worried :)June 24, 2014 at 1:56 pm #173599paulob
ParticipantHi,
Perhaps this might render more consistently.
http://codepen.io/paulobrien/full/GohcK/
It seems ok at first glance.
June 24, 2014 at 1:56 pm #173600nixnerd
Participant@shaneisme… what are your support requirements? Is ie10+ cool? This type of element becomes DRASTICALLY easier and cleaner with flexbox.
These are for
input
… but you get the idea:http://philipwalton.github.io/solved-by-flexbox/demos/input-add-ons/
June 24, 2014 at 2:10 pm #173601shaneisme
Participant@paulob – I like some of your ideas, I might just iron some of them in.
Joe – For this particular element, I have to do things without flexbox. Someday :)
June 24, 2014 at 2:30 pm #173603shaneisme
ParticipantAfter not quite getting the border to line up at all zooms before the @paulob version, I went with adding a bit more CSS following his lead.
http://codepen.io/drainpip/pen/EGeyg/
(I added in the functions I use at the top just to make it easy to go back and forth from CodePen so don’t mind me)
If anyone can make this better (smaller) I’d be all ears.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.