Jump to content

replacing tables with css


Recommended Posts

I am putting a new site together and after I started it, I got into learning css/xhtml. However, I am having a horrible time figuring out how to control the page layout without my beloved tables. Here is where I was at so far USING tables for page layout: New siteSo, in order to switch to css I set up this page to work on the positioning and page layout. I basically set up a 3 column layout with header and footer - which I think should work in the end. My problem is the spaces that are being added here and there. I can't splice images together and lock the layout in with extra spaces added after the images. I've tried several things using classes and id's to clear, but no luck. How do I get a <div> to wrap tight around an image? Thanks for any help!

Link to post
Share on other sites

which image are you referring to? the header? if you want to use clear, use clear: somevalue. maybe if you could explain what about your current layout you want to behave differently.

Link to post
Share on other sites

I think the issue might be with default margins/padding that are applied to different elements. Try using a CSS reset:

* {   margin: 0px;   padding: 0px;}

Edit: Put this at the very top of your CSS stylesheet, before anything else.

Edited by ShadowMage
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...