This is how my table code is shown when I view it using Firefox firebug. I am using Razor with MVC and I am doing paging and these are links to pages.
What I want to know is there any way I can give some css to add a special/seperate style to the number 7 (Note number 7 here is the current selected page and hence no link is shown)
OR is there any way I can add tag to this text using Javascript/jquery ?
Please any help is appreciated.
This is my first post here, so I am really sorry if I have not followed any rules/conventions for writing a post.
Not sure if I understand the question 100%, but from what I can see you know what a class and a id is - but it always helps to refresh your mind about the basics.
An ID can only be used once in a document, and a class selector can be used as many times you'd wish to. And if you give that number seven a unique ID you will be able to style it like you want.
I'm sorry, I have less experience with the MCV Razor engine, so I'm not sure if I can help any further now that I see what the real problem is. I guess you could make jQuery search the documents for the id "#footer", and make it go to the 7th a-attribute to give it an unique ID - but that sounds like a very clumsy way to do this.
I think you should look for the code part that processes this HTML to the document and see if there is any possibility to give it an unique ID from there. :)
Thanks for your reply. I have seen the links you posted. But in my case the child will keep on changing.. is there any way to check which child is not surrounded by any tag and then surround it by some tag ?
Also you can check this link for a pure css dropdown menu. I don't see any client script written in there and it looks good. But there is a problem. It performs differently in a firefox browser.
This is how my table code is shown when I view it using Firefox firebug.
I am using Razor with MVC and I am doing paging and these are links to pages.
What I want to know is there any way I can give some css to add a special/seperate style to the number 7 (Note number 7 here is the current selected page and hence no link is shown)
OR is there any way I can add tag to this text using Javascript/jquery ?
Please any help is appreciated.
This is my first post here, so I am really sorry if I have not followed any rules/conventions for writing a post.
Thanks in advance
Yasser
An ID can only be used once in a document, and a class selector can be used as many times you'd wish to. And if you give that number seven a unique ID you will be able to style it like you want.
Yes I know, but the thing is this html code is generated by the MVC Razor engine and not by me, I am just trying to implemented css here,
Is there any way I can do this ?
OR any way in which I can add an HTML tag to this text dynamically using jquery or javascript
I think you should look for the code part that processes this HTML to the document and see if there is any possibility to give it an unique ID from there. :)
http://www.mkyong.com/jquery/jquery-nth-child-selector-example/
http://css-tricks.com/how-nth-child-works/
http://css-tricks.com/useful-nth-child-recipies/
Thanks for your reply. I have seen the links you posted. But in my case the child will keep on changing.. is there any way to check which child is not surrounded by any tag and then surround it by some tag ?
I know you can't fully style the current page number since there's no tag surrounding it, but it's a start....?
Here is the screenshot : Link to screenshot...
I know I am close to it, please one more hint and I am there
Thanks in advance :)
I love this forum
Thanks senff. Made my day!
Also you can check this link for a pure css dropdown menu. I don't see any client script written in there and it looks good. But there is a problem. It performs differently in a firefox browser.
http://www.encodedna.com/2013/01/css-animated-dropdown-menu.htm