Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!


Sponsored Content

 

 
 

Photo
- - - - -

Css Help


  • Please log in to reply
3 replies to this topic

#1 madams

madams

    HR 5

  • Active Members
  • PipPipPipPipPip
  • 504 posts
  • Location:Costa Blanca, Spain

Posted 20 February 2007 - 08:15 AM

CODE
#imageleft {
  float:left;
  padding-right:7px;
  padding-bottom:7px;
  }

#imageright {
  float:right;
  padding-right:7px;
  padding-bottom:7px;
  }


CODE
<img src="Jpeg%27s/costa-blanca-pics/calpe-beach.jpg" width="160" id="imageleft" height="97" alt="Calpe beach" border="0">


With the css code above the picture floats to the left or right. I know this is probably very simple but I have searched and found conflicting answers.

Question: How do I add a title below the picture that floats with it?
Also, does this method have cross brouser problems?

Thanks...

#2 linux_lover

linux_lover

    LiLo

  • Active Members
  • PipPipPipPipPipPip
  • 831 posts
  • Location:York, UK

Posted 20 February 2007 - 08:21 AM

Just wrap the image and text in a div element:

CODE
.floatleft {
  float:left;
  padding-right:7px;
  padding-bottom:7px;
}

.floatright {
  float:right;
  padding-right:7px;
  padding-bottom:7px;
}

.floatleft img, .floatright img {border:none}
.floatleft p {color:red}

<div id="floatleft">
<img src="Jpeg%27s/costa-blanca-pics/calpe-beach.jpg" alt="Calpe beach" />
<p>Some text that you want to display under the image, this can also have a css properties for more control.</p>
</div>


#3 madams

madams

    HR 5

  • Active Members
  • PipPipPipPipPip
  • 504 posts
  • Location:Costa Blanca, Spain

Posted 20 February 2007 - 08:32 AM

Thanks Linux Lover for the quick reply.

Just getting started with css, love it!

#4 linux_lover

linux_lover

    LiLo

  • Active Members
  • PipPipPipPipPipPip
  • 831 posts
  • Location:York, UK

Posted 20 February 2007 - 09:18 AM

No problemo, CSS rules - I recommend the W3Schools tutorials smile.gif




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users