5 replies [Last post]
kiwis
kiwis's picture
Offline
Enthusiast
Last seen: 34 weeks 4 days ago
Timezone: GMT+13
Joined: 2009-03-07
Posts: 52
Points: 80

I've got a basic page, very basic in fact <div class="MainPage"> and inside that I have <div class="Header">

Inside the header class I want to have 3 buttons, left middle and right and side of the white form which is set in the MainPage class.

How can I evenly split these?

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 1 year 1 week ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

It depends

You haven't really provided enough info. A look at what code you have already (HTML & CSS) and a visual of what the page is supposed to look like would help.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

kiwis
kiwis's picture
Offline
Enthusiast
Last seen: 34 weeks 4 days ago
Timezone: GMT+13
Joined: 2009-03-07
Posts: 52
Points: 80

Here is my code, two to the

Here is my code, two to the left, one to the right.

.HeadL{
	float:left;
}
 
.HeadM{
	float:none;
	margin: 0 auto;
}
 
.HeadR {
	float:right;
}
 
.Header{
	min-height: 50px;
	height: 50px;
	width: 1024px;
	margin-left:auto;
	margin-right:auto;
}

<div class="Header">
<img class="HeadL" src="images/bnt1.jpg" />
<img class="HeadM" src="images/btn2.jpg" />
<img class="HeadR" src="images/btn3.jpg" />
</div>

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 1 year 1 week ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

.HeadM

.HeadM shouldn't need any styles applied to it. Just make .Header text-align:center and add overflow:hidden to it too to contain the floats.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

kiwis
kiwis's picture
Offline
Enthusiast
Last seen: 34 weeks 4 days ago
Timezone: GMT+13
Joined: 2009-03-07
Posts: 52
Points: 80

true, thanks. I'm very new to

true, thanks. I'm very new to CSS.

I have another question, I'll load a new thread.

vikramrandhawa
vikramrandhawa's picture
Offline
newbie
Chandigarh
Last seen: 2 years 47 weeks ago
Chandigarh
Timezone: GMT+5.5
Joined: 2011-09-28
Posts: 6
Points: 6

Just divide the div tag in

Just divide the div tag in the three in three partition...
and put the images in that particular partitions...