/    Sign up×
Community /Pin to ProfileBookmark

Div and H1 in line

I have a H1 element (left) and a div with some other content to the right. I want that div in line with the H1. Now the div comes first and the H1 is below the div ([url]http://www.cv-de-kleibakkers.nl/foto[/url]). I read about spans, but don’t know how to exactly do this.

to post a comment
CSS

6 Comments(s)

Copy linkTweet thisAlerts:
@PprakashNov 25.2010 — clearly say which h1 and which div.


I mean above gallery, you put break here
Copy linkTweet thisAlerts:
@gwbonlineauthorNov 25.2010 — On the mentioned page I mean the first H1 and the div that contains an image that says 'Hoe werkt de fotogalerij?'

I want that image to the right in line with the H1 on the left. There is no break here...
Copy linkTweet thisAlerts:
@PprakashNov 26.2010 — change the follwong class as below i.e. change float:right to float:left;

#hoewerkthet {

float:left;

padding-bottom:15px;

}


then you get as seen in attached file

[upl-file uuid=5adcdc34-be47-4b97-93c4-88d22945906b size=14kB]test.jpg[/upl-file]
Copy linkTweet thisAlerts:
@gwbonlineauthorNov 26.2010 — Thanks, but I want the image to the right like I said earlier. No break, the image on the same line of the H1 (H1 all the way to the left and image all the way to the right). I appreciatie your help. Thanks!
Copy linkTweet thisAlerts:
@stefanrajNov 26.2010 — Try the following code.

#hoewerkthet {

float:left;

padding-bottom:15px;

text-align:right;

width:100%;

}

h1 {

color:#901F19;

font-size:25px;

margin-top:-1px;

text-transform:uppercase;

}

Remove the text-align:center for <p> tag.

try it.
Copy linkTweet thisAlerts:
@PprakashNov 26.2010 — change like this,

#hoewerkthet {

float:right;

padding-bottom:15px;

position:relative;

top:40px;

margin-top:-50px;

}

then you get as soon in the image file

[upl-file uuid=7b4cd30e-7cdc-4832-a9ed-bdc37fe3403a size=33kB]test1.jpg[/upl-file]
×

Success!

Help @gwbonline 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.18,
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,
)...