- This topic is empty.
-
AuthorPosts
-
June 29, 2013 at 11:14 am #45955
slaggsten
MemberHey everyone!
I recently made my own wordpress site and need som help!
I am trying to position som text and a picture of myself like on this website: http://www.billykick.com
At the moment my website looks like this: Anton.stallbacka.com
I am starting to get the absolute and realative positioning but can’t figure it out anyway. Any suggestions? :-)
June 29, 2013 at 3:57 pm #140957Kuzyo
Participantwhy use absolute position? You can make it with **float: left;** for image or **float: right;** for text but dont forget about clearfix for container in your case it #page
June 29, 2013 at 4:14 pm #140958dgriesel
ParticipantBTW: 3.5MB background-image?
If you split the header into a JPEG background-image (the kangaroo) and a PNG for the text and the overlay at the bottom, you will be able to reduce the size a lot
June 29, 2013 at 4:49 pm #140960slaggsten
MemberAbout the headr/footer and text, yeah i know ;) just have this for now, until i’ve fixed the basics.
So, I am using absolute in order for the hover effect on the picture to work. But maybe i should skip that for now. Would i write for example .entry-content img {
position:realative;
top:blahblah;
left:blahblah;
float:left;
}to fix the picture and
.entry-content {
position:realative;
top:blahblah;
left:blahblah;
float:right;
}to fix the text? isn’t there any more specific than .entry-content to target only the text?
What do you mean about the: dont forget about clearfix for container in your case it #page. I’m a newbie ;-)
June 29, 2013 at 4:50 pm #140961slaggsten
MemberAbout the headr/footer and text, yeah i know ;) just have this for now, until i’ve fixed the basics.
So, I am using absolute in order for the hover effect on the picture to work. But maybe i should skip that for now. Would i write for example .entry-content img {
position:realative;
top:blahblah;
left:blahblah;
float:left;
}to fix the picture and
.entry-content {
position:realative;
top:blahblah;
left:blahblah;
float:right;
}to fix the text? isn’t there any more specific than .entry-content to target only the text?
What do you mean about the: dont forget about clearfix for container in your case it #page. I’m a newbie ;-)
June 29, 2013 at 4:51 pm #140962slaggsten
Memberoh cant get the code right.. anyway you get what i mean ?
June 29, 2013 at 4:55 pm #140963Kuzyo
Participantif you are going to use float you don’t have to use absolute position. Here is greate article https://css-tricks.com/all-about-floats/
Add **float: left;** to img and than add some **margin-left** for textJune 29, 2013 at 5:19 pm #140967slaggsten
Memberto fix the text? isn’t there any more specific than .entry-content to target only the text? Chaning the position of .entry-content will also affect the picture since they are both content of the same post
June 29, 2013 at 5:28 pm #140969Kuzyo
ParticipantDo you want photo to left and text to right like one post? if Yes try what I said remove position absolute from img and set float: left; instead
June 29, 2013 at 6:45 pm #140990slaggsten
MemberBut with position:relative the hover effect wont work properly. Take a look now, all is good. But now the image’s top is cut, can’t find the reason. I will change and image-sizes and also make the text real text and not a picture. But i will save stuff like this till later :-) Thanks for fast response! So any idea why the picture is cut? and what does “but dont forget about clearfix for container in your case it #page” mean, that kuzyo told me earlier ?
June 29, 2013 at 7:34 pm #140995slaggsten
Memberok thanks, But would overflow:visible; work ?
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.