![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
|
Image float, wrap text, oh boy!
I'll get straight to the point.
I need to have a heading thats centred and reasonably large font. Also, need to have an image "floated" to its left. Thoe obvious problem is that the float pushes my text over to the right so its not centre aligned. Here's a snapshot of my current working. I have tried using absolute and relative positioning, but the variability its moving around the page and covering the text up between browsers has been annouying to the say the least. A recent thought I have just had, but have implemented yet, is to make the first line and the image 1 image thats centred and then centre the remaining text below that. Of course the problem is the text as an image won't look crash hot and wouldn't make it all as liquid and consistent then if could be, I think. Any suggestions are most welcome. |
|
|
|
|
|
#2 |
|
Programmer
|
I think this can actually be done rather easily without messing with floats, or positioning. Just using a bit of CSS ought to do the trick.
CSS Section: #heading {
text-align:center;
}
#headimage {
background-image:url(images/someimage.jpg);
background-repeat:no-repeat
}And the xhtml to go with it: <div id="heading"> <div id="headimage"> <p>Title Here</p> </div> </div> I tested this very hastily in firefox and IE 6 in Windows, and it appeared to work fine. Let me know if any of this is unclear, and I'll try to say it better. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|