I need to nudge one character up a few pixels...
I know this should be easy but.....!,
I have a pipe character that is inline with some other text but i need to nudge that sole character up by a few pixels. I put inside a span tag no problem but the positioning properties are not being read like margin-top:-10px or top:-10px.
i set it's containing div properties to position:relative thinking that would help but it didn't. How can i nudge one character (in a span) up a a few pixels?
<div><a href="index.php" class="headlink"><h1>Name Here <span class="pipe">|</span>Title Here</h1></a></div>
Position: relative is for block items, not in line elements.
My understanding is that negative margins cancel out existing margins. So margin-top: -10px may not work if there is not a top margin set. I hope that helps.
Hi there toptomato,
bearing in mind that it is not permissible to place an "h1 element" within an "a element", try it like this...
border-bottom:2px solid #00f;
margin:-5px 5px 0;
<a href="index.php" class="headlink">
Good spot, but why not just move the <h1> tags outside the <a> tags? I.e.
Originally Posted by coothead
<a href="index.php" class="headlink">Name Here <span class="pipe">|</span>Title Here</a>
belated thanks all for the help. i will try them out.
fyi - here's what i did:
it's important to keep the H1 elements together for SE indexing purposes, so i turned the pipe char into a little gif and set as the H1 background.
F.Y.I. in case you want code for the special characters
▐ ▐ 2 pipes ▐
► play button ►
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)