 |
BOOK: Beginning HTML, XHTML, CSS, and JavaScript  | This is the forum to discuss the Wrox book Beginning HTML, XHTML, CSS, and JavaScript by Jon Duckett; ISBN: 978-0-470-54070-1 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning HTML, XHTML, CSS, and JavaScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

February 21st, 2010, 01:04 AM
|
|
Registered User
|
|
Join Date: Feb 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Creating a <div> within a cell to centre links
GDay any p2p's
I'm not sure about the code I need to do the following:
Create a <div> within the content cell of your layout table with centred links and a font-size of 10pt.
Another question
How do I make the link on the navigation page be plain text (i.e. no hyperlink)?
Thanks to any helpers
Christom
Last edited by Christom; February 21st, 2010 at 03:08 AM..
|
|

March 6th, 2010, 07:09 AM
|
|
Friend of Wrox
|
|
Join Date: Dec 2003
Posts: 488
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
Quote:
Originally Posted by Christom
GDay any p2p's
I'm not sure about the code I need to do the following:
Create a <div> within the content cell of your layout table with centred links and a font-size of 10pt.
|
You mean something like this?
Code:
<div style="text-align:center;font-size:10pt">
Quote:
Originally Posted by Christom
Another question
How do I make the link on the navigation page be plain text (i.e. no hyperlink)?
|
Wouldn't that defeat the purpose of it being navigation?
Last edited by ciderpunx; March 6th, 2010 at 07:10 AM..
Reason: typo
|
|

March 6th, 2010, 12:19 PM
|
|
Friend of Wrox
|
|
Join Date: Nov 2007
Posts: 207
Thanks: 2
Thanked 15 Times in 15 Posts
|
|
hmm...
Couldn't you also just do something like this?
<td align="center" style="valign: middle;">
</td>
also for plain text you could just make some kind of tag around the text and just use the onclick event with some javascript to navigate
<font onclick="window.location.href='http://www.google.com';">Click here</font>
__________________
Jason Hall
Follow me on Twitter @jhall2013
|
|

March 6th, 2010, 01:12 PM
|
|
Friend of Wrox
|
|
Join Date: Dec 2008
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
|
|
If you go with the font tag as suggested above, add style="text-decoration : underline;" or something similar, so that the link portion is visual.
|
|

March 6th, 2010, 06:52 PM
|
|
Friend of Wrox
|
|
Join Date: Nov 2007
Posts: 207
Thanks: 2
Thanked 15 Times in 15 Posts
|
|
I didn't put the underline in there because they said it should be plain text but yes if you want the links to be visually different definitely put some styling in there.
__________________
Jason Hall
Follow me on Twitter @jhall2013
|
|

March 27th, 2010, 06:42 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
|
|
Quote:
Originally Posted by Christom
How do I make the link on the navigation page be plain text (i.e. no hyperlink)?
|
Certainly, although this would typically be done server side. Navigation is a primary application requirement so you usually don't want to execute it in Javascript which ...maybe... will work. So my first recommendation would be to code this in your server side language like C#. This way you can do things like define each link in the navigation to be wrapped in a <strong></strong> tag or an <a href="..."></a> and define that if the link matches the current page wrap the text in strong elements and if not wrap it in a live link.
That said, you can execute the same thing in Javascript, I would code the navigation in XHTML as links, then use Javascript to trace the DOM evaluate each link on the page and if the target page is the current page, then change the <a></a> tags to <strong></strong> tags.
__________________
-------------------------
Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe
When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper
Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
|
|
 |