- This topic is empty.
-
AuthorPosts
-
May 23, 2013 at 10:14 am #45046
jony
ParticipantHi everyone,
Two questions for you.
Please see this diagram: [http://i.imgur.com/dja3vOb.png](http://i.imgur.com/dja3vOb.png “http://i.imgur.com/dja3vOb.png”)
1 – how do i make two text links absolutely positioned on either side of a fixed centered image?
2 – how do i markup the links so that the tags sit on top of the main word and are aligned with the center of the page (left/right text align)?
Thanks!
JonyMay 23, 2013 at 10:21 am #136198Paulie_D
MemberSo you want them vertically centered **regardless** of the height of the the ‘outer’ div?
>so that the tags sit on top of the main word
Not sure what you mean by this.
Perhaps a better image example?
May 23, 2013 at 10:27 am #136200jony
ParticipantHi Paulie_D
Here is the actual design: [http://i.imgur.com/051Qwd6.png](http://i.imgur.com/051Qwd6.png “http://i.imgur.com/051Qwd6.png”)
May 23, 2013 at 10:36 am #136201ChrisP
ParticipantMay 23, 2013 at 10:44 am #136202jony
Participant@ChrisP @Paulie_D Sorry guys, the forum played a trick apparently. “so that the tags sit on top of the main word” should have read “so that the span sit on top of the main word”
This week’sBrunch
This week’sLunchTo me it makes sense that the lunch and brunch classes are text-aligned left and right, so that takes care of the positioning of the span (relative to the center); I just don’t know how to make the spans appear on top of the main word
May 23, 2013 at 10:47 am #136204Paulie_D
MemberWhy use spans?
No reason that can’t both be links wrapper in a h tag.: http://codepen.io/Paulie-D/pen/xckbi
If you **really** need this to be a single link there are other options.
Sometimes it’s best not to overthink these things.
May 23, 2013 at 10:53 am #136206jony
Participant@Paulie_D, ideally when one hovers over the text, both the top and the bottom changes colours, which is why I assumed the span class was the way to go. Is there any other way you can think of?
May 23, 2013 at 10:59 am #136210Paulie_D
MemberWell you **could** do that with a ‘adjacent’ selector.
May 23, 2013 at 11:16 am #136214unasAquila
ParticipantI have [forked](http://codepen.io/unasAquila/pen/fEatb) @ChrisP Pen maybe helpful
May 23, 2013 at 11:17 am #136215Paulie_D
MemberSecond thoughts…sometimes a `
` and a `` is the simplest option.May 23, 2013 at 3:30 pm #136238wolfcry911
ParticipantHere’s my quick and dirty pen
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.