Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
CSS layout of the Content section?
Old 06-27-2006, 09:00 PM CSS layout of the Content section?
Average Talker

Posts: 25
Trades: 0
I need advice on how to go about structuring a layout using CSS for text & images in the “Content” box. I have mostly text with 5 images that need to be displayed at specific points in the text on this page.


Am assuming I would need to use div boxes to contain the text & images in different groups to keep the images and text spaced properly, which sounds similar to the table method I used in the past.


What is a good method for doing this with CSS that maintains the W3C standards, etc.
stevefarillo is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-28-2006, 01:46 AM Re: CSS layout of the Content section?
vangogh's Avatar
Post Impressionist

Posts: 10,688
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
There's probably going to be more than one solution. How I would set it up would depend on the layout and where you specifically want the images to be located in relation to the text. I'm not sure anyone can give you a good answer without a better idea of the layout.

Do you have an image showing what you're after or even a table based layout that's set up so we can see?

It can defintiely be done, but hard to know how without seeing what you're after.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 06-28-2006, 03:09 AM Re: CSS layout of the Content section?
Average Talker

Posts: 25
Trades: 0
Here is a hyper-link to my table-based page with the text & images.
My Page
stevefarillo is offline
Reply With Quote
View Public Profile
 
Old 06-28-2006, 10:19 AM Re: CSS layout of the Content section?
techwench's Avatar
Code Monkey

Posts: 1,449
Name: Danalyn
Location: Dallas, TX
Trades: 0
Strictly speaking about the text/image positioning in the content section, I would just do something like this in the stylesheet:

Code:
.imgleft { float: left; margin-right: 20px; }
.imgright { float: right; margin-left: 20px; }
Then, in the actual content html:

HTML Code:
<img src="img1.jpg" class="imgleft" />
<p>blah blah blah</p>

<img src="img2.jpg" class="imgright" />
<p>more blah blah</p>
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by techwench; 06-28-2006 at 10:21 AM..
techwench is offline
Reply With Quote
View Public Profile
 
Old 06-28-2006, 10:22 AM Re: CSS layout of the Content section?
techwench's Avatar
Code Monkey

Posts: 1,449
Name: Danalyn
Location: Dallas, TX
Trades: 0
Oh, and to make sure each paragraph is on its own line, and images don't drop into the next paragraph...

Code:
.clear { clear: both; }
HTML Code:
<img src="img1.jpg" class="imgleft" />
<p>blah blah blah</p>

<div class="clear"></div>

<img src="img2.jpg" class="imgright" />
<p>more blah blah</p>
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
techwench is offline
Reply With Quote
View Public Profile
 
Old 06-28-2006, 02:52 PM Re: CSS layout of the Content section?
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
TechWench, you took the words - and code - right out of my mouth.. GMTA
That is exactly the method I use for my sites and it works perfectly.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 06-28-2006, 02:56 PM Re: CSS layout of the Content section?
Average Talker

Posts: 25
Trades: 0
Ok, so just float the images either to the left or right, then add a .clear class to keep the paragraphs separate from the underlying images.

That will help me get it going.

thanks! techwrench
stevefarillo is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to CSS layout of the Content section?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.31969 seconds with 12 queries