Jump to content


Photo

DIV instead of TABLE


  • Please log in to reply
5 replies to this topic

#1 crashmaster

crashmaster
  • Members
  • PipPipPip
  • Advanced Member
  • 169 posts
  • LocationCzech Republic, Prague

Posted 31 July 2006 - 09:02 PM

hi...
I am starting to use DIVs instead of TABLE>.
I have i question ..
I have code in tables
<table width="643" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="5"><img src="imgs/header.gif" width="643" height="74" /></td>
  </tr>
  <tr>
    <td><img src="imgs/header_left.gif" width="171" height="30" /></td>
    <td><img src="imgs/header_home.gif" width="85" height="30" /></td>
    <td><img src="imgs/header_about.gif" width="79" height="30" /></td>
    <td><img src="imgs/header_portfolio.gif" width="121" height="30" /></td>
    <td><img src="imgs/header_right.gif" width="188" height="30" /></td>
  </tr>
</table>

I need to do the same effect but in DIV ///
Can somebody help me ??
I'll never be the same...

#2 progbass8

progbass8
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 31 July 2006 - 09:15 PM

Try something like this:

<div width="643" border="0" >
<img src="#" width='643' height='74' alt="img0" />
<br>
<img src="#" width="171" height="30" alt="img1" />
<img src="#" width="85" height="30" alt="img2" />
<img src="#" width="79" height="30" alt="img3" />
<img src="#" width="121" height="30" alt="img4" />
<img src="#" width="188" height="30" alt="img5" />
</div>

The line break should function the same way as a new tablerow.  If it doesn't, let me know.

-Bryan

#3 crashmaster

crashmaster
  • Members
  • PipPipPip
  • Advanced Member
  • 169 posts
  • LocationCzech Republic, Prague

Posted 31 July 2006 - 09:28 PM

its bad idead..coz images have no its position,..
and it doesnt match to itself...
it is look like this:
Posted Image
I'll never be the same...

#4 cmgmyr

cmgmyr
  • Members
  • PipPipPip
  • Advanced Member
  • 1,278 posts
  • LocationUSA

Posted 31 July 2006 - 09:40 PM

Try this
<div id="wrapper" style="margin:0px auto;">
<div style="width:643; height:74;" ><img src="#" width='643' height='74' alt="img0" /></div>
<div style="width:643; height:30;padding:0px;" ><img src="#" width="171" height="30" alt="img1" /><img src="#" width="85" height="30" alt="img2" /><img src="#" width="79" height="30" alt="img3" /><img src="#" width="121" height="30" alt="img4" /><img src="#" width="188" height="30" alt="img5" /></div>
</div>

** make sure all of your link images are on one line. IE has problems with new lines when doing something like this.

-Chris

#5 moberemk

moberemk
  • Members
  • PipPipPip
  • Advanced Member
  • 695 posts

Posted 01 August 2006 - 01:47 AM

<div id="wrapper" style="margin:0px auto;">
<div style="width:643; height:74;" ><img src="#" width='643' height='74' alt="img0" /></div>
<div style="width:643; height:30;padding:0px;" ><img src="#" width="171" height="30" alt="img1" /><img src="#" width="85" height="30" alt="img2" /><img src="#" width="79" height="30" alt="img3" /><img src="#" width="121" height="30" alt="img4" /><img src="#" width="188" height="30" alt="img5" /></div>
</div>
Actually, no, don't do that. That's bad. It uses inline style definitions and won't solve the problem. Instead, do this:
<div id="header">
    <div id="header_img"><img src="#" width="643" height="74" alt="img0" /></div>
    <div id="header_img_row"><img src="#" width="171" height="30" alt="img1" /><img src="#" width="85" height="30" alt="img2" /><img src="#" width="79" height="30" alt="img3" /><img src="#" width="121" height="30" alt="img4" /><img src="#" width="188" height="30" alt="img5" /></div>
</div>
Then attach this piece of code to your stylesheet:
div#header_img_row img {
       margin: 0px;
       padding: 0px;
}
By doing that, there won't be any spacing to the images.
Disclaimer: No matter how harsh I may be, I'm always IMO only.

#6 crashmaster

crashmaster
  • Members
  • PipPipPip
  • Advanced Member
  • 169 posts
  • LocationCzech Republic, Prague

Posted 01 August 2006 - 09:08 AM

ok,,,thank you 0))
I'll never be the same...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users