|
|||||||
| CSS Discussion and technical support relating to Cascading Style Sheets. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I want to realize the following:
This is | IMAGE | This is a text | IMAGE | a text on the | IMAGE | on the left side | IMAGE | right side How can I do this? I have tried it with the following CSS but it doesn't work: Code:
#content #contentleft {
width: 375;
float: left;
}
#content #contentright {
width: 375;
float: right;
text-align: left;
}
#content img.center {
float: center;
margin: 0 0 8px 8px;
}
|
|
#2
|
||||
|
||||
|
That is normal layout
Code:
<p>This is <img> This is</p>
__________________
At least 98% of internet users' DNA is identical to that of chimpanzees |
|
#3
|
|||
|
|||
|
No, the text on the left side must be independed from the text on the right side. It should be two columns with an image between them exactly like in the picture (attachment).
Thanks |
|
#4
|
||||
|
||||
|
The example in this thread is the reverse... image - text - image.
You can easily adapt it to what you want... inside one paragraph. oh.... "float:center"??? ...none, left or right are your options.
__________________
...but stupidity is terminal. Last edited by opifex; 11-22-2009 at 07:56 AM. |
|
#5
|
||||
|
||||
|
__________________
At least 98% of internet users' DNA is identical to that of chimpanzees |
|
#6
|
|||
|
|||
|
Thanks, but it seems to be to complicated because I don't want to set the line break for the image manually. Isn't it possible without extra classes?
I now have used http://www.basictips.com/text-betwee...t-tables.shtml and switched the text with the image but then the image has its own column and the text doesn't wrap completely around it... |
|
#7
|
||||
|
||||
|
There is no simple solution to this layout. When css3 becomes mainstream it should become easier.
__________________
At least 98% of internet users' DNA is identical to that of chimpanzees |
|
#8
|
|||
|
|||
|
I have the problem that Firefox displays everything correct but Internet Explorer or Google Chrome don't. You can try it by yourself on http://www.reisenachoz.de/v2/about.php .
The CSS looks like this: Code:
.floatleft {
float: left;
margin-right: 5px;
width: 353px;
}
.floatright {
float: right;
margin-left: 5px;
width: 353px;
}
p {
margin: 0;
padding: 0.4em 0;
color: #FFFFFF;
line-height: 1.4em;
text-align: justify;
}
HTML Code:
<p> <span class="floatleft">This is the text on the left side. </span> <img src="images/about.png"> <span class="floatright">This is the text on the right side. </span> </p> |
|
#9
|
||||
|
||||
|
clear the floats.... check the referenced post for the example.
HTML Code:
clear:both; HTML Code:
<p> <span class="floatleft">This is the text on the left side. </span> <span class="floatright">This is the text on the right side. </span> <img src="images/about.png" alt="alt text"/> </p>
__________________
...but stupidity is terminal. Last edited by opifex; 11-24-2009 at 12:56 AM. |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|