Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic 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
 
Old January 15th, 2004, 07:15 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: High Wycombe, UK, United Kingdom.
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default CSS Help

I'm trying to convert my site form tables to CSS, but for some reason the content DIV extends to far to the right for some reason, I need it to look like the tabled version, any ideas ?

CSS http://www.greggriffiths.org/livelin...ions/fortysix/
Tables http://www.greggriffiths.org/livelin...ons/fortyfive/
__________________
All the best

Greg
------------------
Greg Griffiths
Web & Livelink Developer
http://www.greggriffiths.org
 
Old January 15th, 2004, 07:51 PM
Friend of Wrox
 
Join Date: Nov 2003
Location: , , .
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I have 2 suggestions:

1) Try setting the width to 100%, and if that doesn't work set it smaller.

2) If suggestion 1 doesn't work, try adding to .content:

word-wrap: break-word;

Personally I don't see why you want to use a DIV when you are just putting the normal content into it, but that is up to you.

Hope this helps,

Snib

 
Old January 15th, 2004, 09:33 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: High Wycombe, UK, United Kingdom.
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default

I was trying to convert the table based approach of the original into a more manageable CSS one, the gist of my research thus far was to replace the tables with divs, if you can provide a more suitable alternative, I'd love to hear it.

The original point of the table approach there was to allow for a gutter /margin on either side of the content so that it wasn't directly against the edge.
 
Old January 16th, 2004, 08:06 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Greg, I'd stick with a table. It's simple and compatible. Plus, I'm not quite sure how you mean to convert "from tables to CSS". You should use CSS to supplement the tables to simplify your table HTML.

I've had weird problems with complicated DIVs. If you specify a DIV to 100% wide, but you put a margin on it sometimes it will overlap other objects. This might be why you're seeing the extension to the right.

Peter
------------------------------------------------------
Work smarter, not harder.




Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS HELP:! CSS EXPANDIBLE BACKGROUND FOR TITLE phpuser2000 CSS Cascading Style Sheets 2 December 19th, 2007 12:36 AM
Rich's new CSS book: Beginning CSS 2nd Edition jminatel BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 0 June 15th, 2007 11:55 AM
how to use CSS ngocntm CSS Cascading Style Sheets 3 September 30th, 2004 04:21 AM
CSS stu9820 HTML Code Clinic 4 May 18th, 2004 08:05 AM
CSS surf Javascript 2 March 25th, 2004 11:36 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.