- This topic is empty.
February 17, 2012 at 7:26 am #36705
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)
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
YasserFebruary 17, 2012 at 7:48 am #96877ZerizMember
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.February 17, 2012 at 7:56 am #96878
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 ?
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. :)February 17, 2012 at 1:46 pm #96897monk18Member
You can use jQuery. In jQuery you ‘ll have the ability to select a specific child. These links should help you.February 20, 2012 at 1:25 am #96989
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 ?February 20, 2012 at 6:10 am #96998
Yes, I did try that and I was some what successfull too but now only thing is that the spacing problem still persists.
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 :)February 20, 2012 at 7:51 am #97014
Worked like a charm !!!!
I love this forum
Thanks senff. Made my day!January 7, 2013 at 12:41 am #120059arun7331Participant
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.
- The forum ‘CSS’ is closed to new topics and replies.