Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

 

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
New Webmasters ask "How-To" questions here. This is where other fucking Webmasters help.

 
Thread Tools
Old 07-28-2009, 08:26 AM   #1
Machete_
WINNING!
 
Industry Role:
Join Date: Oct 2002
Posts: 14,579
CSS question/problem

Ok - let me try and explain the problem

I have a list where I want to add a few pictures, like this:

<li><image 01><image 02><image 03><image 04></li>


I want the image to be sorounded by a border and a caption text below.


I have it on a blog, but i suck at CSS and my programmer went on vacation without telling me.

I was hoping for a solution where I add the style to the global CSS file and could write something like
<li><div class="imgbox><image 01>some text</div> <div class="imgbox><image 02>some text</div> <div class="imgbox><image 03>some text</div> </li>

But if I do that, it adds a linebreak.. what am i doing wrong here?
Machete_ is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 07-28-2009, 10:37 AM   #2
Machete_
WINNING!
 
Industry Role:
Join Date: Oct 2002
Posts: 14,579
Figured it out myself

made a style like this

PHP Code:
 div.box 
{ha 
width
:320px;
padding:5px;
border:1px solid #CCC;
margin:5px;
float:left;
text-align:center;
background-color#f0f0f0;


and added this to the doc

PHP Code:
<div class="box"> <img src="image.jpg" alt="alt img text" width="300" height="200"><br>text below image</div
Machete_ is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 07-28-2009, 10:44 AM   #3
Killswitch - BANNED FOR LIFE
Guest
 
Posts: n/a
jQuery ftw!

<li><img src="image.jpg" alt="your text here" /></li>

Using jQuery that will do exactly what you need :D
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 07-28-2009, 10:45 AM   #4
webboy21
Confirmed User
 
Industry Role:
Join Date: Nov 2004
Location: The Netherlands
Posts: 573
you didn't need the <br>....you could have used div.box img and then display: block;

also no float needed, actually not sure why you are adding the float
__________________
Available for: CSS | XHTML | PHP | MySQL | Webdesign

webboy21 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 07-28-2009, 11:03 AM   #5
webboy21
Confirmed User
 
Industry Role:
Join Date: Nov 2004
Location: The Netherlands
Posts: 573
oh wait, you wanted them next to eachother...never mind...that's why you need the float :P
__________________
Available for: CSS | XHTML | PHP | MySQL | Webdesign

webboy21 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 07-28-2009, 11:33 AM   #6
Machete_
WINNING!
 
Industry Role:
Join Date: Oct 2002
Posts: 14,579
Aholes

I spend 3 hours going through CSS tutorials and cursing why it wouldent work


I will look at both the solutions you suggested just to make sure I do the smartest thing from the start..

thanks
Machete_ is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 07-28-2009, 02:47 PM   #7
webboy21
Confirmed User
 
Industry Role:
Join Date: Nov 2004
Location: The Netherlands
Posts: 573
sorry kris, if I had seen this earlier I would have said so earlier
__________________
Available for: CSS | XHTML | PHP | MySQL | Webdesign

webboy21 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 07-28-2009, 03:32 PM   #8
Machete_
WINNING!
 
Industry Role:
Join Date: Oct 2002
Posts: 14,579
Quote:
Originally Posted by webboy21 View Post
sorry kris, if I had seen this earlier I would have said so earlier
No worries. all that matter is it got done and I learned something
Machete_ is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 07-29-2009, 03:11 AM   #9
JeffCliff
Confirmed User
 
JeffCliff's Avatar
 
Join Date: Jul 2008
Posts: 183
Quote:
Originally Posted by KrisH View Post
Ok - let me try and explain the problem

I have a list where I want to add a few pictures, like this:

<li><image 01><image 02><image 03><image 04></li>


I want the image to be sorounded by a border and a caption text below.


I have it on a blog, but i suck at CSS and my programmer went on vacation without telling me.

I was hoping for a solution where I add the style to the global CSS file and could write something like
<li><div class="imgbox><image 01>some text</div> <div class="imgbox><image 02>some text</div> <div class="imgbox><image 03>some text</div> </li>

But if I do that, it adds a linebreak.. what am i doing wrong here?
Wait, your programmer just gets up and goes on vacation when he pleases... Can I work for you?
__________________
Private Partners Network - Up to 50%; FULL range of products; Weekly payouts - always on time! PM me for more details!
JeffCliff is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 07-29-2009, 10:09 AM   #10
tonyparra
Confirmed User
 
tonyparra's Avatar
 
Industry Role:
Join Date: Jul 2008
Location: In your back seat with duck tape
Posts: 4,568
I need to do something similar was jus goona post on it lemme try what you did...
__________________

High Performance Vps $10 Linode
Manage your Digital Ocean, Linode, or Favorite Cloud Server. Simple, fast, and secure Server Pilot
tonyparra is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 07-29-2009, 10:14 AM   #11
tonyparra
Confirmed User
 
tonyparra's Avatar
 
Industry Role:
Join Date: Jul 2008
Location: In your back seat with duck tape
Posts: 4,568
Actually wrong i want the text to align at the top to the right of the image is this possible in a list?
__________________

High Performance Vps $10 Linode
Manage your Digital Ocean, Linode, or Favorite Cloud Server. Simple, fast, and secure Server Pilot

Last edited by tonyparra; 07-29-2009 at 10:18 AM.. Reason: missed some words
tonyparra is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 07-29-2009, 10:30 AM   #12
tonyparra
Confirmed User
 
tonyparra's Avatar
 
Industry Role:
Join Date: Jul 2008
Location: In your back seat with duck tape
Posts: 4,568
Heres and example of what im saying:

see how the text is under and at bottom of pictures? how can i align it to the top so that it looks better? Im using a list.
__________________

High Performance Vps $10 Linode
Manage your Digital Ocean, Linode, or Favorite Cloud Server. Simple, fast, and secure Server Pilot

Last edited by tonyparra; 07-29-2009 at 10:31 AM.. Reason: left out image
tonyparra is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 07-29-2009, 04:23 PM   #13
Machete_
WINNING!
 
Industry Role:
Join Date: Oct 2002
Posts: 14,579
Quote:
Originally Posted by tonyparra View Post
Heres and example of what im saying:

see how the text is under and at bottom of pictures? how can i align it to the top so that it looks better? Im using a list.
'

you are related to teencat, I would rather fuck bill o'reilly bareback in the middle the vatican city, before I would provide you with as much as one nano-inch of helpfull advice.

Was that clear enough for you?
Machete_ is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 07-29-2009, 04:24 PM   #14
Machete_
WINNING!
 
Industry Role:
Join Date: Oct 2002
Posts: 14,579
Quote:
Originally Posted by JeffCliff View Post
Wait, your programmer just gets up and goes on vacation when he pleases... Can I work for you?
he is not "my" programmer, its just a guy I use when I need simple stuff done
Machete_ is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 07-29-2009, 09:14 PM   #15
tonyparra
Confirmed User
 
tonyparra's Avatar
 
Industry Role:
Join Date: Jul 2008
Location: In your back seat with duck tape
Posts: 4,568
Quote:
Originally Posted by KrisH View Post
'

you are related to teencat, I would rather fuck bill o'reilly bareback in the middle the vatican city, before I would provide you with as much as one nano-inch of helpfull advice.

Was that clear enough for you?
Why do you want to fuck bill o'reilly man?
__________________

High Performance Vps $10 Linode
Manage your Digital Ocean, Linode, or Favorite Cloud Server. Simple, fast, and secure Server Pilot
tonyparra is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
 
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.