5 replies [Last post]
wg17
Offline
newbie
Last seen: 12 years 51 weeks ago
Joined: 2006-11-23
Posts: 3
Points: 0

Hello everyone,

Please forgive me if my question seems a little straight forward, I'm new to css:

I currently have a content block that contains a H3. I have applied a border-bottom to the H3 to mimic a horizontal rule. The page also contains an image that has been floated to the right.

The problem is that the border applied to the H3 is passing through the floated image and appearing on the other side!

Is there any way I can force the border to stop when it encounters the image?

Thanks in advance

BonRouge
BonRouge's picture
Offline
Enthusiast
Sendai, Japan
Last seen: 11 years 8 weeks ago
Sendai, Japan
Timezone: GMT+9
Joined: 2005-07-10
Posts: 237
Points: 0

link

Can you show us the page?

wg17
Offline
newbie
Last seen: 12 years 51 weeks ago
Joined: 2006-11-23
Posts: 3
Points: 0

Hi bonrouge, Here is the

Hi bonrouge,

Here is the page:

http://www.trafford.gov.uk/cme/live/cme3302.htm

Tom L
Tom L's picture
Offline
Enthusiast
Liverpool
Last seen: 8 years 31 weeks ago
Liverpool
Timezone: GMT+1
Joined: 2005-09-23
Posts: 91
Points: 2

Try putting a margin-right

Try putting a margin-right on the h3 (maybe about 30px).
This should stop it going all the way to the right.

wg17
Offline
newbie
Last seen: 12 years 51 weeks ago
Joined: 2006-11-23
Posts: 3
Points: 0

link

Hi Tom,

I thought about doing this but there will be further instances in the page where I will use H3 and want it to extend the full width of the content.

Thanks

BonRouge
BonRouge's picture
Offline
Enthusiast
Sendai, Japan
Last seen: 11 years 8 weeks ago
Sendai, Japan
Timezone: GMT+9
Joined: 2005-07-10
Posts: 237
Points: 0

So give that particular h3

So give that particular h3 an id and give it a margin-right (i.e. not giving a right margin to all h3s - just that one).