/    Sign up×
Community /Pin to ProfileBookmark

making two divs adjacent within container

i need to make two divs adjacent to create a thinner links column to the left compared to the main content column to the right. do i use the float attribute?

ps. i have taken into account some code posted earlier regarding this ? but im sure there’s just a couple of lines need adding for this now.

[url]www.huntersonline.org.uk/new/[/url]

to post a comment
CSS

8 Comments(s)

Copy linkTweet thisAlerts:
@ray326Jul 24.2005 — It's not clear what you need. Do you want to put links below the green text in the existing left column or do you want to add a third column?
Copy linkTweet thisAlerts:
@bogbrushianauthorJul 24.2005 — i hope this is clear. the bit saying 'The home of the Hunter family on the web' needs to be to the left of the main div

cheers

[upl-file uuid=d8790f0c-b110-4cf6-8790-8374f91e9dc3 size=11kB]layout.JPG[/upl-file]
Copy linkTweet thisAlerts:
@NogDogJul 25.2005 — See if this is what you're looking for:
<i>
</i>#leftcolumn {
background-color: white;
padding: 10px;
width: 200px;
float: left;
color: #01ab0c;
font-size: 0.8em;
}

#content {
background-color: white;
padding: 10px 10px 10px 220px;
}

#footer {
background-color: #01ab0c;
width: 690px;
padding: 5px;
border-top: #D0D0D0 2px solid;
font-size: 0.9em;
clear: both;
}
Copy linkTweet thisAlerts:
@ray326Jul 25.2005 — the bit saying 'The home of the Hunter family on the web' needs to be to the left of the main div[/QUOTE]Oh. You're looking at it in IE; it's already arranged that way when viewed with a web browser although the div doesn't go down to the footer.
Copy linkTweet thisAlerts:
@bogbrushianauthorJul 25.2005 — that code worked a treat thanks ?

btw it didnt work in IE for me previously

the only thing is now is the browser differences. IE netscape FF and opera all display differently due to the various padding etc. probs. does anybody have ideas? such as browser hacks?

cheers
Copy linkTweet thisAlerts:
@bogbrushianauthorJul 26.2005 — browser hacks for the rendering differences anyone?

thanks
Copy linkTweet thisAlerts:
@NogDogJul 26.2005 — The main thing I've found is to not assume any margins, paddings, line-heights, or border-widths will be the same for any elements on different browsers unless you explicitly set them.
Copy linkTweet thisAlerts:
@bogbrushianauthorJul 26.2005 — thanks il try declaring everything
×

Success!

Help @bogbrushian 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.9,
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,
)...