- This topic is empty.
-
AuthorPosts
-
January 29, 2013 at 7:23 am #42336
sshuvro58
Participanthttp://i49.tinypic.com/18ycjt.png
Plz check the image above . you will see two navigation bar .First one is the example , which I want to create but I have created the second one .
How can I remove the extra border on the right ?
How can I shorten the height the border?
In example only the first menu (about us) aligned on the left and rest of them are aligned in center , how can I do this ?
January 29, 2013 at 7:41 am #122707Paulie_D
MemberWe really need to see a link to a live site or a reduced case in Codepen
January 29, 2013 at 10:36 am #122730Paulie_D
MemberAs for your border height issue, there is no single CSS property that will let you set a border that is 50% high.
You can set different heights for the anchor tags and list items and only apply the border to the anchor tags but this will leave you with a reduced ‘clickable’ area.
I seem to recall someone coming up with something previously in the forums that **might** be the answer but I think it involved playing around with margins?
I think it was @chrisburton but whether code still exists or not is another matter.
Perhaps a search of the site?
January 29, 2013 at 11:18 am #122732Miller
Member> How can I shorten the height the border?
a { line-height:1em; }
January 29, 2013 at 11:28 am #122734Paulie_D
Member@Miller What will that achieve? Isn’t 1em the default?
As I said..
>You can set different heights for the anchor tags and list items and only apply the [EDIT] **only** [END EDIT] border to the anchor tags but this will leave you with a reduced ‘clickable’ area.
January 29, 2013 at 11:31 am #122736Paulie_D
Member>the answer lies in a negative margin, I just don’t have time to tinker with it right now.
Yeah I thought so.
Frankly, I don’t think it would be worth the effort when a very tiny image would serve just as well. :)
January 29, 2013 at 11:50 am #122737Miller
Member> What will that achieve? Isn’t 1em the default?
default is something like 1.4em
line-height:1em will reduce line height to font size so height of the element and its border will be the same with font size, but yes it will reduce ‘clickable’ area too (depends on what are you doing.. it’s just text links or it’s some kind of buttons with clickable area).
Anyway you can use right positioned background image for border and use data:image to save number of http requests ( https://css-tricks.com/data-uris/ )
January 29, 2013 at 3:13 pm #122769sshuvro58
Participantthanks to ChrisP , Miller ,Paulie_D
I have learned a lot of new things from you
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.