Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > HTML > BOOK: Beginning HTML, XHTML, CSS, and JavaScript
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 21st, 2010, 01:04 AM
Registered User
 
Join Date: Feb 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Post 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..
Reply With Quote
  #2 (permalink)  
Old March 6th, 2010, 07:09 AM
Friend of Wrox
Points: 1,515, Level: 15
Points: 1,515, Level: 15 Points: 1,515, Level: 15 Points: 1,515, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2003
Location: Oxford, , United Kingdom.
Posts: 488
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Quote:
Originally Posted by Christom View Post
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 View Post
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?
__________________
--
Charlie Harvey's website - linux, perl, java, anarchism and punk rock: http://charlieharvey.org.uk

Last edited by ciderpunx; March 6th, 2010 at 07:10 AM.. Reason: typo
Reply With Quote
  #3 (permalink)  
Old March 6th, 2010, 12:19 PM
Friend of Wrox
 
Join Date: Nov 2007
Location: Central Florida, USA.
Posts: 207
Thanks: 2
Thanked 15 Times in 15 Posts
Default 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
Reply With Quote
  #4 (permalink)  
Old March 6th, 2010, 01:12 PM
Friend of Wrox
 
Join Date: Dec 2008
Location: , , .
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default

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.
Reply With Quote
  #5 (permalink)  
Old March 6th, 2010, 06:52 PM
Friend of Wrox
 
Join Date: Nov 2007
Location: Central Florida, USA.
Posts: 207
Thanks: 2
Thanked 15 Times in 15 Posts
Default

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
Reply With Quote
  #6 (permalink)  
Old March 27th, 2010, 06:42 PM
Friend of Wrox
Points: 1,749, Level: 16
Points: 1,749, Level: 16 Points: 1,749, Level: 16 Points: 1,749, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2007
Location: San Diego, CA, USA.
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

Quote:
Originally Posted by Christom View Post
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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Page Container <div> and another ,div. not behaving as expected SouthendSupporter ASP.NET 3.5 Basics 8 December 15th, 2009 10:05 AM
Links after the <ul> tag bcat BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 May 15th, 2005 10:59 PM
<style> tags in a <body> vs. <div> bcat BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 March 27th, 2005 08:50 AM
scrolling <DIV> anshul Javascript How-To 12 August 4th, 2004 09:51 AM
<A><DIV><TABLE></DIV></A> anshul HTML Code Clinic 2 July 17th, 2004 02:17 PM



All times are GMT -4. The time now is 01:51 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.