User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 401,648 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,690 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 3958 | Replies: 6 | Solved
Reply
Join Date: Mar 2004
Location: In a house
Posts: 94
Reputation: Ragnarok is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 0
Ragnarok Ragnarok is offline Offline
Junior Poster in Training

Layout Tables to CSS

  #1  
Jun 25th, 2004
I have been working on my site for some time and its not yet been released. What I want to do is modify my layout so that it works with CSS insted of tables. All my efforts so far have gone in vain because the gaps between the <div> and <span> tags are just to wide and I have tryed everything I know to reduce them but they are still huge.

Does anyone know of any good tutorials or can give me some pointers as to where I might have gone wrong?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2004
Location: Brisbane
Posts: 632
Reputation: Slade has a spectacular aura about Slade has a spectacular aura about 
Rep Power: 7
Solved Threads: 6
Slade's Avatar
Slade Slade is offline Offline
Practically a Master Poster

Re: Layout Tables to CSS

  #2  
Jun 29th, 2004
It's hard at first... but I eventually got mine to work, post your css code here and I"ll review it and see if I can help.


Slade
Formerly known as Slade.
Reply With Quote  
Join Date: Jul 2004
Location: Toronto
Posts: 5
Reputation: Innocent is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
Innocent Innocent is offline Offline
Newbie Poster

Re: Layout Tables to CSS

  #3  
Jul 4th, 2004
Be sure to code for a browser, with CSS NS and IE dont' seem to agree on pixel locations. Like slade said, post your CSS along with your HTML page so he (and maybe I) may look it over. There are a buncha lil technical things that the W3C validators don't like, so don't mess with the pre-formated tags using style rules. If you want, I have a CSS tutorial at my site you could probably glance at, might help.

If you do visit my site, you'll notice that my content div is shifted, is there any way I can keep it aligned with the rest of the page at various resolutions? I'm using percent right now, but it's not working...
Reply With Quote  
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,888
Reputation: cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice 
Rep Power: 32
Solved Threads: 110
Admin
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: Layout Tables to CSS

  #4  
Jul 4th, 2004
Div tags are generally used to encapsulate paragraphs, body content, and for text/image positioning and layout. Span tags are used to emphasize a word or two, such as
<div>This is my paragraph. I would like to <span style="font-weight:bold">emphasize</span> this word.</div>
Reply With Quote  
Join Date: Jul 2004
Location: Toronto
Posts: 5
Reputation: Innocent is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
Innocent Innocent is offline Offline
Newbie Poster

Re: Layout Tables to CSS

  #5  
Jul 4th, 2004
Originally Posted by cscgal
Div tags are generally used to encapsulate paragraphs, body content, and for text/image positioning and layout. Span tags are used to emphasize a word or two, such as
<div>This is my paragraph. I would like to <span style="font-weight:bold">emphasize</span> this word.</div>


You could use
<em>blahblah</em>
but all the tags like that (ie, <strong>, <b>, <s>, etc) may soon be deperciated in favour of the span tag + style atribute. What cscgal said is correct though, just thought I'd expand
Reply With Quote  
Join Date: Mar 2008
Location: Belgium, Leuven
Posts: 14
Reputation: Aeneassan is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
Aeneassan's Avatar
Aeneassan Aeneassan is offline Offline
Newbie Poster

Re: Layout Tables to CSS

  #6  
Mar 9th, 2008
When I started out with CSS I got a lot of help from source code at the csszengarden.com , also I think it's great more people are switching to tableless layouting

Also the comment about coding for a browser is a good tip but you have to make sure you get it right for both IE and FF (the two most commonly used browsers), I think IE 8 is the most used version of IE now?

And yet another thing, if you're writing your css, you shouldn't use inline css (in my opinion). Your html should basicly only be

  1. <html>
  2. <head>
  3. <title>my page</title>
  4. <link to your css file!>
  5. <some meta tags>
  6. </head>
  7. <body>
  8. <some divs>with content</div>
  9. </body>
  10. </html>

and as above the link to your css file is linking... to a separate css page. This way you'll never have to search around for any styles you made. Use clear id's and classes as not to get confused.

I hope I haven't overposted here...
Last edited by peter_budo : Mar 10th, 2008 at 9:05 am. Reason: Keep It Organized - missing [code] tags
Reply With Quote  
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,220
Reputation: peter_budo is a jewel in the rough peter_budo is a jewel in the rough peter_budo is a jewel in the rough 
Rep Power: 10
Solved Threads: 270
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: Layout Tables to CSS

  #7  
Mar 10th, 2008
You just open 3 years old post, is there any need?
Last edited by peter_budo : Mar 10th, 2008 at 9:06 am.
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb HTML and CSS Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the HTML and CSS Forum

All times are GMT -4. The time now is 6:29 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC