Help needed - lose formatting when browser is resized
Posted: 19 April 2010 04:49 PM   [ Ignore ]
Newbie
Rank
Total Posts:  1
Joined  2010-04-19

Hi,

after dipping my toe with some wordpress sites I had a go at coding my first CSS divs - they seem to work ok apart from when I shrink the size using cmd -.

Then the text doesn’t shrink alongside the images so it pops out of the box. I have an image as background to a div, within which I have spanned three divs to get them inline. Here’s the html bit:

<div class=“box”>
<div class=“logoleft”>
    <span>http://ukfamilybreaks.com/wp-content/uploads/2010/04/coast_and_country_logo.jpg</span>
</div>

<div class=“centertext”>
    <span>Coast and Country Cottages offer holiday accommodation in Devon to suit every taste and budget, from cosy cottages, converted barns, family seaside properties, luxury waterside apartments to comfortable bungalows close to unspoilt beaches.</span>
</div>

<div class=“moreinfo”>
    <span>http://ukfamilybreaks.com/wp-content/uploads/2010/04/more_info_160.png</span>
</div>
</div>


and here’s the style:

.logoleft {
      float:left;
      width: 130px;
      margin:20px 0 0 20px;
      }

.centertext {
      float:left;
      width: 240px;
      margin:20px 0 0 10px;
      }

.moreinfo {
      float:left;
      width:170px;
      height:100px;
   
      margin:20px 0 0 10px;
      }

.box {
      width:590px;
      height:150px;
      background: url(images/box1.jpg) no-repeat;
      }

BR#mybr {clear:left}

You can see oe of the pages affected here, uk cottage holidays

If anyone knows a technique to get around this resizing issue I’d really appreciate it :)

Thanks,

Bob

Profile