/    Sign up×
Community /Pin to ProfileBookmark

Really struggling with this

Here is some table example of what I want to accomplish using css basically with out using float right in css how do i display the exact same content layout using div tags. Thanks…

<table width=”547″ border=”0″ cellspacing=”5″ cellpadding=”5″>
<tr>
<td width=”196″>Content 1 </td>
<td width=”316″>Content 2 </td>
</tr>
</table>
<br />
<br />
<table width=”547″ border=”0″ cellspacing=”5″ cellpadding=”5″>
<tr>
<td width=”196″>Content 1 </td>
<td width=”155″>Content 2 </td>
<td width=”156″>Content 3 </td>
</tr>
</table>

to post a comment
CSS

5 Comments(s)

Copy linkTweet thisAlerts:
@CentauriJan 25.2007 — So, what's the problem with using a float? - its one of the useful things you can do with css...

Cheers

Graeme
Copy linkTweet thisAlerts:
@realtime158authorJan 25.2007 — the problem is i got a div layer that is centered when i use float how do i move that box laye to the position so that it stays within my layout
Copy linkTweet thisAlerts:
@CentauriJan 25.2007 — How about this html [CODE]<div id="top">
<div class="left">Content 1</div>
<div class="right">Content 2</div>
</div>
<div id="mid">
<div class="left">Content 1</div>
<div class="right">Content 3</div>
<div class="centre">Content 2</div>
</div>[/CODE]


and this css [CODE]* {
border: 0;
margin: 0;
padding: 0;
}
#top {
padding: 5px;
width: 547px;
margin: 15px 15px 40px;
}
.left {
width: 196px;
float: left;
padding: 5px;
}
#top .right {
margin-left: 201px;
padding: 5px;
}
#mid {
width: 547px;
padding: 5px;
margin: 15px 15px 40px;
}
#mid .right {
width: 156px;
float: right;
padding: 5px;
}
#mid .centre {
margin: 0 161px 0 201px;
padding: 5px;
}
[/CODE]

The floats are within other containers, so you should be able to use this anywhere.

Cheers

Graeme
Copy linkTweet thisAlerts:
@realtime158authorJan 25.2007 — Thanks for all of your help what is a good css book to buy that will guide me more into this.
Copy linkTweet thisAlerts:
@ray326Jan 25.2007 — Check out the ones in my sig.
×

Success!

Help @realtime158 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...