|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
[css] text up to the right of pic somehow?
hiyer,
i've got a basic page layout - 1 fixed width column centered on the page containing text and pictures. there's text that goes with each picture and i'd like to somehow get the text next to, to the right, of the pictures, rather than underneath using css. i've put together a small simple example of the exact setup on this page: http://www.pinkgoblin.com/~cumminjo...st/coltest.html all the css used so far is in the html head. any ideas how that should be done? thanks. |
|
#2
|
|||
|
|||
|
check out the float attribute
http://www.w3schools.com/css/css_classification.asp http://www.w3schools.com/css/tryit....me=trycss_float |
|
#3
|
|||
|
|||
|
yup, getting there. thanks.
the images themselves are floating away to the right aswell as the text: http://www.pinkgoblin.com/~cumminjo...t/coltest2.html :/ any ideas? thanks. |
|
#4
|
||||
|
||||
|
try to add this to css
css: p {clear:left;} and write the text in the same paragraph as the image html: <p><img rc="coltest2_files/a-picture.png" class="floatimg" width="260px" height="130px"> <span class="hello">some text i'd really like to get to the right of the picture, rather than underneath.</span></p> remember to set px to width and height, |
|
#5
|
|||
|
|||
|
yup, that works a treat. thanks. the bottom looks a bit odd but it doesn't matter because i only put the dashed line on for the purposes of the example page, so i don't intend to actually use the dashed line.
http://www.pinkgoblin.com/~cumminjo...t/coltest3.html thanks very much that is exactly what i was after.at the risk of being annoying, a further question: what if i wanted to get each of the text blocks ranged to the bottom of the pictures rather than the tops as they are at the moment in the above linked to example? is that possible? would it need to be done using a completely different method? |
|
#6
|
|||
|
|||
|
oh, except it's not working in explorer (5.2 os x) :/
|
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > [css] text up to the right of pic somehow? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|